-
-
Notifications
You must be signed in to change notification settings - Fork 14.7k
mutable noalias: re-enable permanently, only for panic=abort, or stabilize flag? #45029
Copy link
Copy link
Closed
Closed
Copy link
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.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.
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.C-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
In #29485 it was discovered that llvm was miscompiling noalias in the context of unwind edges. Further sleuthing determined that it was only a problem with mutable references, and the performance impact was fairly small.
In #31545 we removed noalias from mutable references based on this information.
In #45012 I added a
-Zmutable-noaliasflag to opt back into the old behaviour.I am told many of the llvm bugs have been fixed (and may be completely fixed by some in-progress rewrites of the relevant components?). Also, we now have a
-Cpanic=abortto disable unwinding altogether, which should be immune to the original problem.This leaves us with three options moving forward (not necessarily mutually exclusive):
-Zmutable-noaliasto a stable-Coption, so stable users can opt in-Cpanic=abortis setI have no particularly strong preference here; all of these options serve my purpose perfectly fine (make stable codegen better for gecko).