[llvm] [AMDGPU] Infer amdgpu-no-flat-scratch-init attribute in AMDGPUAttributor (PR #94647)

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Mon Aug 19 06:50:24 PDT 2024


================
@@ -1054,12 +1054,6 @@ GCNUserSGPRUsageInfo::GCNUserSGPRUsageInfo(const Function &F,
   const CallingConv::ID CC = F.getCallingConv();
   const bool IsKernel =
       CC == CallingConv::AMDGPU_KERNEL || CC == CallingConv::SPIR_KERNEL;
-  // FIXME: Should have analysis or something rather than attribute to detect
-  // calls.
-  const bool HasCalls = F.hasFnAttribute("amdgpu-calls");
-  // FIXME: This attribute is a hack, we just need an analysis on the function
-  // to look for allocas.
-  const bool HasStackObjects = F.hasFnAttribute("amdgpu-stack-objects");
----------------
arsenm wrote:

In the interest of making the test changes smaller, I think this part should be done in a separate patch (which also removes AMDGPUAnnotateKernelFeatures at the same time). This patch should just do the pure inference.

Although now that the attributor is moved, I'm worried about passes between amdgpuattributor and codegen introducing new addrspacecasts 

https://github.com/llvm/llvm-project/pull/94647


More information about the llvm-commits mailing list