forked from OSchip/llvm-project
a004f22a2d
model the dense vector instruction bonuses. Previously, this code really didn't effectively compute the density of inlined vector instructions and apply the intended inliner bonus. It would try to compute it repeatedly while analyzing the function and didn't handle the case where future vector instructions would tip the scales back towards the bonus. Instead, speculatively apply all possible bonuses to the threshold initially. Once we *know* that a certain bonus can not be applied, subtract it. This should delay early bailout enough to get much more consistent results without actually causing us to analyze huge swaths of code. I expect some (hopefully mild) compile time hit here, and some swings in performance, but this was definitely the intended behavior of these bonuses. This also dramatically simplifies the computation of the bonuses to not interact with each other in confusing ways. The previous code didn't do a good job of this and the values for bonuses may be surprising but are at least now clearly written in the code. Finally, fix code to be in line with comments and use zero as the bailout condition. Patch by Easwaran Raman, with some comment tweaks by me to try and further clarify what is going on with this code. http://reviews.llvm.org/D8267 llvm-svn: 238276 |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
CallGraph.cpp | ||
CallGraphSCCPass.cpp | ||
CallPrinter.cpp | ||
GlobalsModRef.cpp | ||
IPA.cpp | ||
InlineCost.cpp | ||
LLVMBuild.txt | ||
Makefile |