Description
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-noalias
flag 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=abort
to disable unwinding altogether, which should be immune to the original problem.
This leaves us with three options moving forward (not necessarily mutually exclusive):
- Promote
-Zmutable-noalias
to a stable-C
option, so stable users can opt in - Enable this internally whenever
-Cpanic=abort
is set - Enable this internally always (unclear if sound today, or when it would be)
I have no particularly strong preference here; all of these options serve my purpose perfectly fine (make stable codegen better for gecko).