[PATCH] D82817: [llvm] Native size estimator for training -Oz inliner
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun Jul 5 22:44:55 PDT 2020
davidxl added inline comments.
================
Comment at: llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp:101
+ IRToNativeSizeLearning::FunctionFeatures::ImportantInstructionSuccessions =
+ {{1, 34}, {15, 27}, {53, 53}, {53, 34}, {1, 11}, {32, 2}, {2, 48},
+ {28, 48}, {1, 45}, {49, 32}, {57, 56}, {55, 53}, {1, 28}, {57, 34},
----------------
Is it possible to avoid using hardcoded opcodes?
================
Comment at: llvm/lib/Analysis/InlineSizeEstimatorAnalysis.cpp:174
+ // traversal.
+ std::sort(FunctionFeatures::ImportantInstructionSuccessions.begin(),
+ FunctionFeatures::ImportantInstructionSuccessions.end());
----------------
Still called for every function .
================
Comment at: llvm/unittests/Analysis/InlineSizeEstimatorAnalysisTest.cpp:97
+#if LLVM_HAVE_TF_API
+ EXPECT_GT(*SizeEstimate, 0);
+#else
----------------
why is the result 0?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D82817/new/
https://reviews.llvm.org/D82817
More information about the llvm-commits
mailing list