Initial implementation of the strength reduction for GEP instructions in

loops.  This optimization is not turned on by default yet, but may be run
with the opt tool's -loop-reduce flag.  There are many FIXMEs listed in the
code that will make it far more applicable to a wide range of code, but you
have to start somewhere :)

This limited version currently triggers on the following tests in the
MultiSource directory:
pcompress2: 7 times
cfrac: 5 times
anagram: 2 times
ks: 6 times
yacr2: 2 times


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17134 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Nate Begeman
2004-10-18 21:08:22 +00:00
parent 103f2eede3
commit eaa13851a7
2 changed files with 257 additions and 1 deletions

View File

@ -141,6 +141,12 @@ FunctionPass *createInstructionCombiningPass();
//
FunctionPass *createLICMPass();
//===----------------------------------------------------------------------===//
//
// LoopStrengthReduce - This pass is strength reduces GEP instructions that use
// a loop's canonical induction variable as one of their indices.
//
FunctionPass *createLoopStrengthReducePass();
//===----------------------------------------------------------------------===//
//
@ -155,7 +161,6 @@ FunctionPass *createLoopUnswitchPass();
//
FunctionPass *createLoopUnrollPass();
//===----------------------------------------------------------------------===//
//
// This pass is used to promote memory references to be register references. A