[llvm] [Attributor] Add support for atomic operations in `AAAddressSpace` (PR #106927)
Shilei Tian via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 18:59:23 PDT 2024
================
@@ -1084,10 +1084,15 @@ static bool runImpl(Module &M, AnalysisGetter &AG, TargetMachine &TM,
if (auto *LI = dyn_cast<LoadInst>(&I)) {
A.getOrCreateAAFor<AAAddressSpace>(
IRPosition::value(*LI->getPointerOperand()));
- }
- if (auto *SI = dyn_cast<StoreInst>(&I)) {
+ } else if (auto *SI = dyn_cast<StoreInst>(&I)) {
A.getOrCreateAAFor<AAAddressSpace>(
IRPosition::value(*SI->getPointerOperand()));
+ } else if (auto *AI = dyn_cast<AtomicRMWInst>(&I)) {
+ A.getOrCreateAAFor<AAAddressSpace>(
+ IRPosition::value(*AI->getPointerOperand()));
+ } else if (auto *CmpX = dyn_cast<AtomicCmpXchgInst>(&I)) {
+ A.getOrCreateAAFor<AAAddressSpace>(
+ IRPosition::value(*CmpX->getPointerOperand()));
----------------
shiltian wrote:
This is handled in https://github.com/llvm/llvm-project/pull/107250. Will rebase this one after https://github.com/llvm/llvm-project/pull/107250 is landed.
https://github.com/llvm/llvm-project/pull/106927
More information about the llvm-commits
mailing list