[PATCH] D149741: [InlineCost][TargetTransformInfo][AMDGPU] Consider cost of alloca instructions in the caller (2/2)

Siu Chi Chan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 18 07:05:37 PDT 2023


scchan added inline comments.


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:1215
+  // end in scratch if the call was not inlined.
   uint64_t AllocaSize = 0;
   SmallPtrSet<const AllocaInst *, 8> AIVisited;
----------------
Should we change this to `unsigned` too?


================
Comment at: llvm/lib/Target/AMDGPU/AMDGPUTargetTransformInfo.cpp:1251
+  // Below the cutoff, assume that the private memory arrays would be
+  // optimized
+  auto AllocaSize = getCallArgsTotalAllocaSize(CB, DL);
----------------
It's not only private arrays but it also includes private objects which have its address taken and passed to the callee as argument?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D149741/new/

https://reviews.llvm.org/D149741



More information about the llvm-commits mailing list