This repository was archived by the owner on May 28, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +8
-5
lines changed
rustc_target/src/abi/call Expand file tree Collapse file tree 2 files changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -3060,9 +3060,10 @@ impl<'tcx> LayoutCx<'tcx, TyCtxt<'tcx>> {
30603060 // LLVM's definition of `noalias` is based solely on memory
30613061 // dependencies rather than pointer equality
30623062 //
3063- // Due to miscompiles in LLVM < 12, we apply a separate NoAliasMutRef attribute
3064- // for UniqueBorrowed arguments, so that the codegen backend can decide
3065- // whether or not to actually emit the attribute.
3063+ // Due to past miscompiles in LLVM, we apply a separate NoAliasMutRef attribute
3064+ // for UniqueBorrowed arguments, so that the codegen backend can decide whether
3065+ // or not to actually emit the attribute. It can also be controlled with the
3066+ // `-Zmutable-noalias` debugging option.
30663067 let no_alias = match kind {
30673068 PointerKind :: Shared | PointerKind :: UniqueBorrowed => false ,
30683069 PointerKind :: UniqueOwned => true ,
Original file line number Diff line number Diff line change @@ -68,8 +68,10 @@ mod attr_impl {
6868 const NonNull = 1 << 3 ;
6969 const ReadOnly = 1 << 4 ;
7070 const InReg = 1 << 5 ;
71- // NoAlias on &mut arguments can only be used with LLVM >= 12 due to miscompiles
72- // in earlier versions. FIXME: Remove this distinction once possible.
71+ // Due to past miscompiles in LLVM, we use a separate attribute for
72+ // &mut arguments, so that the codegen backend can decide whether
73+ // or not to actually emit the attribute. It can also be controlled
74+ // with the `-Zmutable-noalias` debugging option.
7375 const NoAliasMutRef = 1 << 6 ;
7476 }
7577 }
You can’t perform that action at this time.
0 commit comments