[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for atomics generating CAS loop
Anshil Gandhi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 12 15:01:32 PDT 2021
gandhi21299 added inline comments.
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:618
expandAtomicRMWToCmpXchg(AI, createCmpXchgInstFun);
+ Ctx.getSyncScopeNames(SSNs);
+ auto MemScope = SSNs[AI->getSyncScopeID()].empty()
----------------
rampitec wrote:
> Only if SSNs.empty().
Sorry, what do you mean? SSN will be empty at that point.
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:624
+ Remark << "A compare and swap loop was generated for an "
+ << AI->getOpcodeName() << "operation at " << MemScope
+ << " memory scope";
----------------
rampitec wrote:
> I believe getOpcodeName() will return "atomicrmw" instead of the operation. Also missing space after it.
getOpcodeName() returns `atomicrmwoperation`, as per the tests the spacing looks correct to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D106891/new/
https://reviews.llvm.org/D106891
More information about the llvm-commits
mailing list