summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/JumpThreading.cpp
diff options
context:
space:
mode:
authorCong Hou <congh@google.com>2015-09-18 18:19:40 +0000
committerCong Hou <congh@google.com>2015-09-18 18:19:40 +0000
commitf9f9ffb98becba3bf72ab121b5f89f4c250b029d (patch)
treea662c296d49e983dcca191e117957b592a525018 /llvm/lib/Transforms/Scalar/JumpThreading.cpp
parent2b38f33b82d9d0dd9dc566edb532f71c2406886c (diff)
downloadbcm5719-llvm-f9f9ffb98becba3bf72ab121b5f89f4c250b029d.tar.gz
bcm5719-llvm-f9f9ffb98becba3bf72ab121b5f89f4c250b029d.zip
Scaling up values in ARMBaseInstrInfo::isProfitableToIfCvt() before they are scaled by a probability to avoid precision issue.
In ARMBaseInstrInfo::isProfitableToIfCvt(), there is a simple cost model in which the number of cycles is scaled by a probability to estimate the cost. However, when the number of cycles is small (which is usually the case), there is a precision issue after the computation. To avoid this issue, this patch scales those cycles by 1024 (chosen to make the multiplication a litter faster) before they are scaled by the probability. Other variables are also scaled up for the final comparison. Differential Revision: http://reviews.llvm.org/D12742 llvm-svn: 248018
Diffstat (limited to 'llvm/lib/Transforms/Scalar/JumpThreading.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud