[PATCH] D43876: [LoopUnroll] Peel off iterations if it makes conditions true/false.
Chad Rosier via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 22 12:02:53 PDT 2018
mcrosier added a comment.
Hi Florian,
We identified a 2.15% regression in SPEC2006/h264ref due to this commit. After this change, the FullPelBlockMotionBiPred() function is no longer inlined into the hottest function, BlockMotionSearch(). Previous to this change, the function was inlined because there was a single callsite in the entire program (known only when compiling in LTO) and the original definition could be removed after inlining. However, after loop peeling the callsite of FullPelBlockMotionBiPred() is replicated, which prevents inlining.
I was wondering if would could avoid peeling in this case until we have some type of cost model that can determine if peeling would prevent inlining. Also, after looking at the code (which I can't share here) you might also notice that the amount of code being peeled in this case is fairly large relative to the amount of code being removed from the loop. It might also make sense to have a heuristic that takes code size into consideration when peeling, if that hasn't already been done.
Thoughts?
Chad
Repository:
rL LLVM
https://reviews.llvm.org/D43876
More information about the llvm-commits
mailing list