[PATCH] D17584: Cleanup inline cost analysis code
David Li via llvm-commits
llvm-commits at lists.llvm.org
Fri Feb 26 16:19:14 PST 2016
davidxl added inline comments.
================
Comment at: lib/Analysis/InlineCost.cpp:1319-1320
@@ -1305,9 +1318,4 @@
// Note that we *must not* cache the size, this loop grows the worklist.
for (unsigned Idx = 0; Idx != BBWorklist.size(); ++Idx) {
- // Bail out the moment we cross the threshold. This means we'll under-count
- // the cost, but only when undercounting doesn't matter.
- if (Cost > Threshold)
- break;
-
BasicBlock *BB = BBWorklist[Idx];
if (BB->empty())
----------------
why is the early bail out removed?
================
Comment at: lib/Analysis/InlineCost.cpp:1328
@@ -1327,3 @@
- if (!analyzeBlock(BB, EphValues)) {
- if (IsRecursiveCall || ExposesReturnsTwice || HasDynamicAlloca ||
- HasIndirectBr || HasFrameEscape)
----------------
Why are these checks removed? Are they redundant? They do look like to be in the wrong place. Can you find out the original intention of the code? Is there a regression test somewhere?
http://reviews.llvm.org/D17584
More information about the llvm-commits
mailing list