Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable mutable noalias for LLVM >= 12 #82834

Merged
merged 6 commits into from
Mar 22, 2021
Merged

Commits on Mar 21, 2021

  1. Move decision aboute noalias into codegen_llvm

    The frontend shouldn't be deciding whether or not to use mutable
    noalias attributes, as this is a pure LLVM concern. Only provide
    the necessary information and do the actual decision in
    codegen_llvm.
    nikic committed Mar 21, 2021
    Configuration menu
    Copy the full SHA
    dfc4caf View commit details
    Browse the repository at this point in the history
  2. Convert -Z mutable-noalias to Optional<bool>

    The default value will dependend on the LLVM version in the future,
    so don't specify one to start with.
    nikic committed Mar 21, 2021
    Configuration menu
    Copy the full SHA
    08c5ffd View commit details
    Browse the repository at this point in the history
  3. Don't consider !Unpin references as noalias

    Such structures may contain self-references, in which case the
    same location may be accessible through a pointer that is not
    based-on the noalias pointer.
    
    This is still grey area as far as language semantics are concerned,
    but checking for !Unpin as an indicator for self-referential
    sturctures seems like a good approach for the meantime.
    nikic committed Mar 21, 2021
    Configuration menu
    Copy the full SHA
    c3f9403 View commit details
    Browse the repository at this point in the history
  4. Enable mutable noalias by default for LLVM 12

    We don't have any known noalias bugs for LLVM 12 ... yet.
    nikic committed Mar 21, 2021
    Configuration menu
    Copy the full SHA
    39ed643 View commit details
    Browse the repository at this point in the history
  5. Don't compute optimized PointerKind for unoptimized builds

    This saves us both the Freeze/Unpin queries, and avoids placing
    noalias attributes, which have a compile-time impact on LLVM
    even in optnone builds (due to always_inline functions).
    nikic committed Mar 21, 2021
    Configuration menu
    Copy the full SHA
    6ac229c View commit details
    Browse the repository at this point in the history
  6. Update doc/reference submodule

    In particular this pulls in an update to the auto-deref
    recursion_limit example, to no longer rely on the Freeze query.
    nikic committed Mar 21, 2021
    Configuration menu
    Copy the full SHA
    68a62b7 View commit details
    Browse the repository at this point in the history