[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A

Anshil Gandhi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 30 09:13:57 PDT 2021


gandhi21299 marked an inline comment as done.
gandhi21299 added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12086
+                   TargetLowering::AtomicExpansionKind Kind, bool UnsafeFlag) {
+  ORE = new OptimizationRemarkEmitter(RMW->getFunction());
+  if (Kind == TargetLowering::AtomicExpansionKind::CmpXChg) {
----------------
arsenm wrote:
> This is supposed to come from the pass, I don't think you can materialize this out of nowhere
I couldn't get `getAnalysis<OptimizationRemarkEmitterWrapperPass>().getORE()` to work.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12100
+  }
+  delete ORE;
+  return Kind;
----------------
arsenm wrote:
> Should not need to create and delete, the analysis pass should own this
above comment


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