Added target lowering hooks which LSR consults to make more intelligent

transformation decisions.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@26738 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Evan Cheng
2006-03-13 23:14:23 +00:00
parent 872421553e
commit d277f2c669
2 changed files with 41 additions and 27 deletions

View File

@@ -15,6 +15,8 @@
#ifndef LLVM_TRANSFORMS_SCALAR_H
#define LLVM_TRANSFORMS_SCALAR_H
#include <cstdlib>
namespace llvm {
class ModulePass;
@@ -22,6 +24,7 @@ class FunctionPass;
class GetElementPtrInst;
class PassInfo;
class TerminatorInst;
class TargetLowering;
//===----------------------------------------------------------------------===//
//
@@ -132,9 +135,12 @@ FunctionPass *createLICMPass();
// 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.
// equal to this value are not reduced. It also takes an optional second
// parameter used to consult the target machine whether certain transformations
// are profitable.
//
FunctionPass *createLoopStrengthReducePass(unsigned MaxTargetAMSize = 1);
FunctionPass *createLoopStrengthReducePass(unsigned MaxTargetAMSize = 1,
const TargetLowering *TLI = NULL);
//===----------------------------------------------------------------------===//
//