[PATCH] D109961: [AMDGPU] Avoid processing functions in amdgpu-propagate-attributes pass for shaders
Piotr Sobczak via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 23 07:47:29 PDT 2021
This revision was automatically updated to reflect the committed changes.
Closed by commit rG2ac53fffaeda: [AMDGPU] Avoid processing functions in amdgpu-propagate-attributes pass for… (authored by piotr).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D109961/new/
https://reviews.llvm.org/D109961
Files:
llvm/lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp
Index: llvm/lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp
===================================================================
--- llvm/lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp
+++ llvm/lib/Target/AMDGPU/AMDGPUPropagateAttributes.cpp
@@ -212,10 +212,10 @@
bool AMDGPUPropagateAttributes::process(Module &M) {
for (auto &F : M.functions())
- if (AMDGPU::isEntryFunctionCC(F.getCallingConv()))
+ if (AMDGPU::isKernel(F.getCallingConv()))
Roots.insert(&F);
- return process();
+ return Roots.empty() ? false : process();
}
bool AMDGPUPropagateAttributes::process(Function &F) {
@@ -228,8 +228,7 @@
SmallSet<Function *, 32> NewRoots;
SmallSet<Function *, 32> Replaced;
- if (Roots.empty())
- return false;
+ assert(!Roots.empty());
Module &M = *(*Roots.begin())->getParent();
do {
@@ -383,7 +382,7 @@
TM = &TPC->getTM<TargetMachine>();
}
- if (!AMDGPU::isEntryFunctionCC(F.getCallingConv()))
+ if (!AMDGPU::isKernel(F.getCallingConv()))
return false;
return AMDGPUPropagateAttributes(TM, false).process(F);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D109961.374546.patch
Type: text/x-patch
Size: 1081 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210923/6d16dd5a/attachment.bin>
More information about the llvm-commits
mailing list