[PATCH] D149740: [InlineCost][TargetTransformInfo][AMDGPU] Consider cost of alloca instructions in the caller (1/2)
Juan Manuel Martinez CaamaƱo via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 5 07:42:10 PDT 2023
jmmartinez updated this revision to Diff 528441.
jmmartinez added a comment.
- I updated InlineCostFeatureAnalyzer::onInitializeSROAArg to match InlineCostCallAnalyzer::onInitializeSROAArg: I'm not sure this is really desired. I'd expect the ML model to figure out the cost by itself. Maybe it deserves an extra "inline-cost feature" to make the distinction (e.g. like `sroa_alloca_cost` or `sroa_alloca_size`)?
- I've added a unittest in InlineCostTest.cpp. The unittest already present in InlineCostTest.cpp only tested if getInliningCostFeatures does provide a result. I've added a test to check the cost calculated by a small example is correct. The test would be better with lit + filecheck though (I have yet to figure how that's done for InlineCostFeaturesAnalyzer).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149740/new/
https://reviews.llvm.org/D149740
Files:
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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D149740.528441.patch
Type: text/x-patch
Size: 6936 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230605/c3b8831c/attachment.bin>
More information about the llvm-commits
mailing list