[PATCH] D106891: [AMDGPU] [Remarks] Emit optimization remarks when an FP atomic instruction is converted into a CAS loop or unsafe hardware instruction for GFX90A
Stanislav Mekhanoshin via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 2 15:06:49 PDT 2021
rampitec requested changes to this revision.
rampitec added a comment.
This revision now requires changes to proceed.
You cannot do it in a generic llvm code, it simply has no knowledge of what was the reason for BE's choice.
================
Comment at: llvm/lib/CodeGen/AtomicExpandPass.cpp:598
+ OptimizationRemark Remark(DEBUG_TYPE, "Passed", RMW->getFunction());
+ Remark << "An unsafe hardware instruction was generated.";
+ return Remark;
----------------
arsenm wrote:
> Unsafe is misleading, plus this is being too specific to AMDGPU
Having UnsafeFPAtomicFlag does not automatically mean a HW instruction produced is unsafe. Moreover, you simply cannot know why this or that decision was done by a target method here.
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