Add support for not strength reducing GEPs where the element size is a small

power of two.  This emphatically includes the zeroeth power of two.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@20429 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Jeff Cohen
2005-03-04 04:04:26 +00:00
parent 8d46a268c5
commit 2f3c9b7562
2 changed files with 30 additions and 4 deletions

View File

@@ -129,9 +129,12 @@ FunctionPass *createLICMPass();
//===----------------------------------------------------------------------===//
//
// LoopStrengthReduce - This pass is strength reduces GEP instructions that use
// a loop's canonical induction variable as one of their indices.
// a loop's canonical induction variable as one of their indices. The
// MaxTargetAMSize is the largest element size that the target architecture
// can handle in its addressing modes. Power of two multipliers less than or
// equal to this value are not reduced.
//
FunctionPass *createLoopStrengthReducePass();
FunctionPass *createLoopStrengthReducePass(unsigned MaxTargetAMSize = 1);
//===----------------------------------------------------------------------===//
//