[llvm] [AMDGPU] Remove duplicated/confusing helpers. NFCI (PR #142598)

Diana Picus via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 4 06:27:18 PDT 2025


================
@@ -978,7 +978,9 @@ bool AMDGPUTargetMachine::isNoopAddrSpaceCast(unsigned SrcAS,
 
 unsigned AMDGPUTargetMachine::getAssumedAddrSpace(const Value *V) const {
   if (auto *Arg = dyn_cast<Argument>(V);
-      Arg && AMDGPU::isKernelCC(Arg->getParent()) && !Arg->hasByRefAttr())
+      Arg &&
+      AMDGPU::isModuleEntryFunctionCC(Arg->getParent()->getCallingConv()) &&
+      !Arg->hasByRefAttr())
----------------
rovka wrote:

It's not intended to be a functionality change, I only inlined isKernelCC's confusing implementation...

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


More information about the llvm-commits mailing list