rampitec added inline comments.

================
Comment at: llvm/lib/Target/AMDGPU/SIISelLowering.cpp:12139
+        OptimizationRemark Remark(DEBUG_TYPE, "Passed", RMW->getFunction());
+        Remark << "A hardware instruction was generated";
+        return Remark;
----------------
gandhi21299 wrote:
> rampitec wrote:
> > It was not generated. We have multiple returns below this point. Some of 
> > them return None and some CmpXChg for various reasons. The request was to 
> > report when we produce the instruction *if* it is unsafe, not just that we 
> > are about to produce an instruction.
> > 
> > Then to make it useful a remark should tell what was the reason to either 
> > produce an instruction or expand it. Looking at a stream of remarks in a 
> > big program one would also want to understand what exactly was expanded and 
> > what was left as is. A stream of messages "A hardware instruction was 
> > generated" unlikely will help to understand what was done.
> Will the hardware instruction be generated in the end of this function then?
It will not be generated here to begin with. If the function returns None the 
atomicrmw will be just left as is and then later selected into the instruction. 
But if you read the function, it has many returns for many different reasons, 
and that is exactly what a useful remark shall report.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D106891

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D106891: [AM... Anshil Gandhi via Phabricator via cfe-commits
    • [PATCH] D106891... Stanislav Mekhanoshin via Phabricator via cfe-commits
    • [PATCH] D106891... Stanislav Mekhanoshin via Phabricator via cfe-commits

Reply via email to