Skip to content

mutable noalias: re-enable permanently, only for panic=abort, or stabilize flag? #45029

Closed
@Gankra

Description

@Gankra

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-LLVMArea: 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.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions