aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorLei Huang <lei@ca.ibm.com>2017-10-12 16:43:33 +0000
committerLei Huang <lei@ca.ibm.com>2017-10-12 16:43:33 +0000
commit0724fea2da637883f1461e12ff46d596a816f758 (patch)
tree167aa66c20867839db6bc0c1556d29ee9845e528 /llvm/lib/IR/Function.cpp
parentc8ffffe4625bc0b0f790824eaa2a591943dff862 (diff)
downloadllvm-0724fea2da637883f1461e12ff46d596a816f758.zip
llvm-0724fea2da637883f1461e12ff46d596a816f758.tar.gz
llvm-0724fea2da637883f1461e12ff46d596a816f758.tar.bz2
[PowerPC] Add profitablilty check for conversion to mtctr loops
Add profitability checks for modifying counted loops to use the mtctr instruction. The latency of mtctr is only justified if there are more than 4 comparisons that will be removed as a result. Usually counted loops are formed relatively early and before unrolling, so most low trip count loops often don't survive. However we want to ensure that if they do, we do not mistakenly update them to mtctr loops. Use CodeMetrics to ensure we are only doing this for small loops with small trip counts. Differential Revision: https://reviews.llvm.org/D38212 llvm-svn: 315592
Diffstat (limited to 'llvm/lib/IR/Function.cpp')
0 files changed, 0 insertions, 0 deletions