[PATCH] D119944: [AMDGPU] Return better Changed status from AMDGPUPerfHintAnalysis
Jay Foad via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 17 01:32:27 PST 2022
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG1822a5ecdd36: [AMDGPU] Return better Changed status from AMDGPUPerfHintAnalysis (authored by foad).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119944/new/
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.409535.patch
Type: text/x-patch
Size: 978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220217/c2d1f6c9/attachment.bin>
More information about the llvm-commits
mailing list