diff options
| author | bors <bors@rust-lang.org> | 2023-01-06 15:20:58 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2023-01-06 15:20:58 +0000 |
| commit | afe8c4537c9009a251a31e8f022b7795fc305d4f (patch) | |
| tree | 47f65b14f307c56212bb6538f378970b5131c214 /compiler/rustc_codegen_llvm/src | |
| parent | 7bbbaabbb6ec93800409478e2af7bc063701604b (diff) | |
| parent | d165a6d70844020e4958ded4f80e30d64dd0bac1 (diff) | |
| download | rust-afe8c4537c9009a251a31e8f022b7795fc305d4f.tar.gz rust-afe8c4537c9009a251a31e8f022b7795fc305d4f.zip | |
Auto merge of #106474 - erikdesjardins:noalias, r=bjorn3
cleanup: handle -Zmutable-noalias like -Zbox-noalias r? `@bjorn3` cc `@RalfJung` this will conflict with #106180
Diffstat (limited to 'compiler/rustc_codegen_llvm/src')
| -rw-r--r-- | compiler/rustc_codegen_llvm/src/abi.rs | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/compiler/rustc_codegen_llvm/src/abi.rs b/compiler/rustc_codegen_llvm/src/abi.rs index a6fd2a7de6b..546540dfd76 100644 --- a/compiler/rustc_codegen_llvm/src/abi.rs +++ b/compiler/rustc_codegen_llvm/src/abi.rs @@ -34,13 +34,6 @@ pub trait ArgAttributesExt { ); } -fn should_use_mutable_noalias(cx: &CodegenCx<'_, '_>) -> bool { - // LLVM prior to version 12 had known miscompiles in the presence of - // noalias attributes (see #54878), but we don't support earlier - // versions at all anymore. We now enable mutable noalias by default. - cx.tcx.sess.opts.unstable_opts.mutable_noalias.unwrap_or(true) -} - const ABI_AFFECTING_ATTRIBUTES: [(ArgAttribute, llvm::AttributeKind); 1] = [(ArgAttribute::InReg, llvm::AttributeKind::InReg)]; @@ -88,9 +81,6 @@ fn get_attrs<'ll>(this: &ArgAttributes, cx: &CodegenCx<'ll, '_>) -> SmallVec<[&' attrs.push(llattr.create_attr(cx.llcx)); } } - if regular.contains(ArgAttribute::NoAliasMutRef) && should_use_mutable_noalias(cx) { - attrs.push(llvm::AttributeKind::NoAlias.create_attr(cx.llcx)); - } } else if cx.tcx.sess.opts.unstable_opts.sanitizer.contains(SanitizerSet::MEMORY) { // If we're not optimising, *but* memory sanitizer is on, emit noundef, since it affects // memory sanitizer's behavior. |
