]> granicus.if.org Git - llvm/commit
[PPC/LoopUnrollRuntime] Don't avoid high-cost trip count computation on the PPC/A2
authorHal Finkel <hfinkel@anl.gov>
Thu, 21 May 2015 20:30:23 +0000 (20:30 +0000)
committerHal Finkel <hfinkel@anl.gov>
Thu, 21 May 2015 20:30:23 +0000 (20:30 +0000)
commit5368a26e16bc1c930103aeb710abdfe803da4446
tree3f92702dbd9546c55fc7896c3d27c7a0a1405f97
parent3b294b5753dc55fd6b12bc803b0054663305c5b1
[PPC/LoopUnrollRuntime] Don't avoid high-cost trip count computation on the PPC/A2

On X86 (and similar OOO cores) unrolling is very limited, and even if the
runtime unrolling is otherwise profitable, the expense of a division to compute
the trip count could greatly outweigh the benefits. On the A2, we unroll a lot,
and the benefits of unrolling are more significant (seeing a 5x or 6x speedup
is not uncommon), so we're more able to tolerate the expense, on average, of a
division to compute the trip count.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237947 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
test/Transforms/LoopUnroll/PowerPC/a2-high-cost-trip-count-computation.ll [new file with mode: 0644]