[llvm] [AMDGPU] Avoid resource propagation for recursion through multiple functions (PR #111004)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 3 08:35:09 PDT 2024
================
@@ -164,6 +167,8 @@ void MCResourceInfo::gatherResourceInfo(
for (const Function *Callee : FRI.Callees) {
if (!Seen.insert(Callee).second)
continue;
+ if (!MF.getFunction().doesNotRecurse() && !Callee->doesNotRecurse())
----------------
arsenm wrote:
Is this structurally relying on the norecurse attribute? You can't rely on it too much, you still need to not blow up in the undefined behavior case.
Unfortunately this will also miss when norecurse is present on the callsite, but not the declaration
https://github.com/llvm/llvm-project/pull/111004
More information about the llvm-commits
mailing list