[PATCH] D119944: [AMDGPU] Return better Changed status from AMDGPUPerfHintAnalysis
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 16 07:44:54 PST 2022
foad created this revision.
foad added a reviewer: piotr.
Herald added subscribers: kerbowa, hiraditya, t-tye, tpr, dstuttard, yaxunl, nhaehnle, jvesely, kzhuravl, arsenm.
foad requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D119944
Files:
llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUPerfHintAnalysis.cpp
@@ -267,19 +267,23 @@
<< " LSMInst cost: " << Info->LSMInstCost << '\n'
<< " TotalInst cost: " << Info->InstCost << '\n');
+ bool Changed = false;
+
if (isMemBound(*Info)) {
LLVM_DEBUG(dbgs() << F.getName() << " is memory bound\n");
NumMemBound++;
F.addFnAttr("amdgpu-memory-bound", "true");
+ Changed = true;
}
if (AMDGPU::isEntryFunctionCC(F.getCallingConv()) && needLimitWave(*Info)) {
LLVM_DEBUG(dbgs() << F.getName() << " needs limit wave\n");
NumLimitWave++;
F.addFnAttr("amdgpu-wave-limiter", "true");
+ Changed = true;
}
- return true;
+ return Changed;
}
bool AMDGPUPerfHint::isMemBound(const AMDGPUPerfHintAnalysis::FuncInfo &FI) {
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119944.409259.patch
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220216/a5e19ce9/attachment.bin>
More information about the llvm-commits
mailing list