[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks for FP atomics

Anshil Gandhi via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Aug 6 11:20:38 PDT 2021


gandhi21299 marked 2 inline comments as done.
gandhi21299 added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12120
+                   OptimizationRemarkEmitter *ORE,
+                   OptimizationRemark OptRemark) {
+  ORE->emit([&]() { return OptRemark; });
----------------
rampitec wrote:
> gandhi21299 wrote:
> > rampitec wrote:
> > > Why OptRemark and not just StringRef? I really want to see as little churn as possible at the call site.
> > With only StringRef, we would also have to pass in RMW since OptimizationRemark constructor depends on that.
> It seems better be a lamda where you can just capture most of the stuff.
What would the type be for the following lambda?

```
[&](){
    return OptimizationRemark(...);
}
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D106891/new/

https://reviews.llvm.org/D106891



More information about the cfe-commits mailing list