summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/StructuredData.cpp
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-05-27 02:49:05 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-05-27 02:49:05 +0000
commita004f22a2dd86c67b2617c88ad5f882877415995 (patch)
tree878eefcd0d1c59cc0a07e333d1814eceb224aaa6 /lldb/source/Core/StructuredData.cpp
parent21b359ae9c010a7424c065eb92dcc7420e476fc1 (diff)
downloadbcm5719-llvm-a004f22a2dd86c67b2617c88ad5f882877415995.tar.gz
bcm5719-llvm-a004f22a2dd86c67b2617c88ad5f882877415995.zip
[inliner] Fix the early-exit of the inline cost analysis to correctly
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
Diffstat (limited to 'lldb/source/Core/StructuredData.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud