-
-
Notifications
You must be signed in to change notification settings - Fork 16.7k
Drop elaboration emits O(N^2) cleanup for partially-initialized aggregate literals #157463
Copy link
Copy link
Open
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationA-mir-optArea: MIR optimizationsArea: MIR optimizationsC-bugCategory: This is a bug.Category: This is a bug.I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
Description
Activity
Metadata
Metadata
Assignees
Labels
A-LLVMArea: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues.A-codegenArea: Code generationArea: Code generationA-mir-optArea: MIR optimizationsArea: MIR optimizationsC-bugCategory: This is a bug.Category: This is a bug.I-compiletimeIssue: Problems and improvements with respect to compile times.Issue: Problems and improvements with respect to compile times.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.Relevant to the compiler team, which will review and decide on the PR/issue.
An aggregate literal of
Ndroppable elements whose initializers can diverge could emitO(N^2)dropterminators. Which chokes LLVM's CVP pass and cost substantial time in optimized build.For example, the following code will take over 60s to build with
-O:See https://github.com/ashi009/cvp-llvm-repro for a runnable example.
Reproducible on 1.96.0 stable (LLVM 22.1.2) and 1.98.0-nightly e7815e5 (LLVM 22.1.6).