about summary refs log tree commit diff
path: root/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
diff options
context:
space:
mode:
authorAugie Fackler <augie@google.com>2021-03-22 14:37:49 -0400
committerAugie Fackler <augie@google.com>2021-03-22 14:37:49 -0400
commit9431e8577d44dcc463134275421a6da6d862c377 (patch)
treec67e734100d95eabee7c40fda3ac7294f10682a0 /compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
parentbabe894bab47e43c2a884fe367095905e4e88993 (diff)
downloadrust-9431e8577d44dcc463134275421a6da6d862c377.tar.gz
rust-9431e8577d44dcc463134275421a6da6d862c377.zip
cleanup: add some comments per review feedback
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp')
-rw-r--r--compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
index d33bce51f02..0391feaf499 100644
--- a/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
+++ b/compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp
@@ -383,6 +383,9 @@ LLVMRustBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Target,
                            LLVMAtomicOrdering Order,
                            LLVMAtomicOrdering FailureOrder, LLVMBool Weak) {
 #if LLVM_VERSION_GE(13,0)
+  // Rust probably knows the alignment of the target value and should be able to
+  // specify something more precise than MaybeAlign here. See also
+  // https://reviews.llvm.org/D97224 which may be a useful reference.
   AtomicCmpXchgInst *ACXI = unwrap(B)->CreateAtomicCmpXchg(
       unwrap(Target), unwrap(Old), unwrap(Source), llvm::MaybeAlign(), fromRust(Order),
       fromRust(FailureOrder));