[PATCH] D54748: [PartialInliner] Make PHIs free in cost computation.
Florian Hahn via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 27 05:20:15 PST 2018
fhahn added inline comments.
================
Comment at: lib/Transforms/IPO/PartialInlining.cpp:857
+ // CodeExtractor, so skip them when computing the region cost.
+ if (IsEntryBB && isa<PHINode>(I))
+ continue;
----------------
davidxl wrote:
> Since you are here, i think it is better to skip all 'nop' operations including (regardless wether it is in entry or not).
> 1) debugintrinsic (already skipped)
> 2) phi node
> 3) nop casting
> 3) functions calls that does not lower to actual calls (TTI.isLoweredToCall())
> Since you are here, i think it is better to skip all 'nop' operations including (regardless wether it is in entry or not).
>
> debugintrinsic (already skipped)
updated to use iterator.
> phi node
> nop casting
Done by the switch now.
> functions calls that does not lower to actual calls (TTI.isLoweredToCall())
We are using getCallsiteCost from InlineCost.cpp to get the cost of function calls. Do you think it is worth the special case this in PartialInliner.cpp? If so, I think it would be better as a separate commit.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D54748/new/
https://reviews.llvm.org/D54748
More information about the llvm-commits
mailing list