Skip to content

Commit 9431e85

Browse files
committed
cleanup: add some comments per review feedback
1 parent babe894 commit 9431e85

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,9 @@ LLVMRustCreateThinLTOData(LLVMRustThinLTOModule *modules,
14381438
};
14391439

14401440
#if LLVM_VERSION_GE(13,0)
1441+
// Uses FromPrevailing visibility scheme which works for many binary
1442+
// formats. We probably could and should use ELF visibility scheme for many of
1443+
// our targets, however.
14411444
lto::Config conf;
14421445
thinLTOResolvePrevailingInIndex(conf, Ret->Index, isPrevailing, recordNewLinkage,
14431446
Ret->GUIDPreservedSymbols);

compiler/rustc_llvm/llvm-wrapper/RustWrapper.cpp

+3
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,9 @@ LLVMRustBuildAtomicCmpXchg(LLVMBuilderRef B, LLVMValueRef Target,
383383
LLVMAtomicOrdering Order,
384384
LLVMAtomicOrdering FailureOrder, LLVMBool Weak) {
385385
#if LLVM_VERSION_GE(13,0)
386+
// Rust probably knows the alignment of the target value and should be able to
387+
// specify something more precise than MaybeAlign here. See also
388+
// https://reviews.llvm.org/D97224 which may be a useful reference.
386389
AtomicCmpXchgInst *ACXI = unwrap(B)->CreateAtomicCmpXchg(
387390
unwrap(Target), unwrap(Old), unwrap(Source), llvm::MaybeAlign(), fromRust(Order),
388391
fromRust(FailureOrder));

0 commit comments

Comments
 (0)