On AMDGPU, alloca instructions have penalty that can
be avoided when SROA is applied after inlining.
This patch introduces the default implementation of
TargetTransformInfo::getCallerAllocaCost.
Paths
| Differential D149740
[InlineCost][TargetTransformInfo][AMDGPU] Consider cost of alloca instructions in the caller (1/2) ClosedPublic Authored by jmmartinez on May 3 2023, 5:22 AM.
Details Summary On AMDGPU, alloca instructions have penalty that can This patch introduces the default implementation of
Diff Detail
Event TimelineComment Actions I'm missing the AMDGPU bit of this patch, or maybe I'm not understanding something? Is it possible to add a small unit test, maybe in unittests/Analysis/InlineCostTest.cpp? Comment Actions
Sorry, I put it on the patch stack: https://reviews.llvm.org/D149741
Will do! Thanks! Comment Actions
This revision is now accepted and ready to land.Jun 26 2023, 7:46 AM
jmmartinez marked an inline comment as done. Comment Actions
Comment Actions
Closed by commit rGcc8a346e3fa3: [InlineCost][TargetTransformInfo][AMDGPU] Consider cost of alloca instructions… (authored by jmmartinez). · Explain WhyJun 29 2023, 12:52 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 535662 llvm/include/llvm/Analysis/TargetTransformInfo.h
llvm/include/llvm/Analysis/TargetTransformInfoImpl.h
llvm/include/llvm/CodeGen/BasicTTIImpl.h
llvm/lib/Analysis/InlineCost.cpp
llvm/lib/Analysis/TargetTransformInfo.cpp
llvm/unittests/Analysis/InlineCostTest.cpp
|
nit: can you do this in 2 steps, easier to read. same in onInitializeSROAArg. thanks