aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms
diff options
context:
space:
mode:
authorEvan Cheng <evan.cheng@apple.com>2006-03-13 23:14:23 +0000
committerEvan Cheng <evan.cheng@apple.com>2006-03-13 23:14:23 +0000
commitd277f2c66914aecb619c12855f6afae4c7ef883b (patch)
tree8b295f06b51efbea22834b5be9261d36862d926f /include/llvm/Transforms
parent872421553e3187717b6c29784e2009ce5cc6811c (diff)
downloadexternal_llvm-d277f2c66914aecb619c12855f6afae4c7ef883b.zip
external_llvm-d277f2c66914aecb619c12855f6afae4c7ef883b.tar.gz
external_llvm-d277f2c66914aecb619c12855f6afae4c7ef883b.tar.bz2
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
Diffstat (limited to 'include/llvm/Transforms')
-rw-r--r--include/llvm/Transforms/Scalar.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/llvm/Transforms/Scalar.h b/include/llvm/Transforms/Scalar.h
index eb2f896..701460d 100644
--- a/include/llvm/Transforms/Scalar.h
+++ b/include/llvm/Transforms/Scalar.h
@@ -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);
//===----------------------------------------------------------------------===//
//