OSDN Git Service

Re-implement the main strength-reduction portion of LoopStrengthReduction.
authorDan Gohman <gohman@apple.com>
Thu, 21 Jan 2010 02:09:26 +0000 (02:09 +0000)
committerDan Gohman <gohman@apple.com>
Thu, 21 Jan 2010 02:09:26 +0000 (02:09 +0000)
commita10756ee657a4d43a48cca5c166919093930ed6b
tree52a9cf0b867521026963ca127f6a46d19f0f8f78
parentac8b4bf66b7263018fe6c133604a30780c24982e
Re-implement the main strength-reduction portion of LoopStrengthReduction.
This new version is much more aggressive about doing "full" reduction in
cases where it reduces register pressure, and also more aggressive about
rewriting induction variables to count down (or up) to zero when doing so
reduces register pressure.

It currently uses fairly simplistic algorithms for finding reuse
opportunities, but it introduces a new framework allows it to combine
multiple strategies at once to form hybrid solutions, instead of doing
all full-reduction or all base+index.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94061 91177308-0d34-0410-b5e6-96231b3b80d8
32 files changed:
include/llvm/Analysis/ScalarEvolutionExpander.h
lib/Analysis/IVUsers.cpp
lib/Analysis/ScalarEvolution.cpp
lib/Analysis/ScalarEvolutionExpander.cpp
lib/Target/X86/X86ISelDAGToDAG.cpp
lib/Transforms/Scalar/IndVarSimplify.cpp
lib/Transforms/Scalar/LoopStrengthReduce.cpp
test/CodeGen/ARM/arm-negative-stride.ll
test/CodeGen/ARM/lsr-code-insertion.ll
test/CodeGen/ARM/remat.ll
test/CodeGen/Thumb2/lsr-deficiency.ll
test/CodeGen/Thumb2/thumb2-ifcvt1.ll
test/CodeGen/X86/2006-05-11-InstrSched.ll
test/CodeGen/X86/2007-08-13-SpillerReuse.ll [deleted file]
test/CodeGen/X86/2007-11-30-LoadFolding-Bug.ll
test/CodeGen/X86/2009-09-10-SpillComments.ll
test/CodeGen/X86/full-lsr.ll
test/CodeGen/X86/iv-users-in-other-loops.ll
test/CodeGen/X86/loop-strength-reduce4.ll
test/CodeGen/X86/loop-strength-reduce8.ll
test/CodeGen/X86/lsr-reuse.ll [new file with mode: 0644]
test/CodeGen/X86/masked-iv-safe.ll
test/CodeGen/X86/pr3495-2.ll
test/CodeGen/X86/remat-mov-0.ll
test/CodeGen/X86/remat-mov-1.ll [deleted file]
test/CodeGen/X86/subreg-to-reg-5.ll [deleted file]
test/Transforms/IndVarSimplify/gep-with-mul-base.ll
test/Transforms/LoopStrengthReduce/2008-08-06-CmpStride.ll
test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-0.ll
test/Transforms/LoopStrengthReduce/change-compare-stride-trickiness-1.ll
test/Transforms/LoopStrengthReduce/count-to-zero.ll
test/Transforms/LoopStrengthReduce/icmp_use_postinc.ll [deleted file]