aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Transforms/Scalar
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Transforms/Scalar')
-rw-r--r--include/llvm/Transforms/Scalar/ConstantProp.h5
-rw-r--r--include/llvm/Transforms/Scalar/DCE.h14
-rw-r--r--include/llvm/Transforms/Scalar/IndVarSimplify.h10
-rw-r--r--include/llvm/Transforms/Scalar/InductionVars.h12
-rw-r--r--include/llvm/Transforms/Scalar/InstructionCombining.h1
5 files changed, 27 insertions, 15 deletions
diff --git a/include/llvm/Transforms/Scalar/ConstantProp.h b/include/llvm/Transforms/Scalar/ConstantProp.h
index d9adf3f399..c4d973516c 100644
--- a/include/llvm/Transforms/Scalar/ConstantProp.h
+++ b/include/llvm/Transforms/Scalar/ConstantProp.h
@@ -4,10 +4,11 @@
//
//===----------------------------------------------------------------------===//
-#ifndef LLVM_OPT_CONSTANT_PROPOGATION_H
-#define LLVM_OPT_CONSTANT_PROPOGATION_H
+#ifndef LLVM_TRANSFORMS_SCALAR_CONSTANT_PROPOGATION_H
+#define LLVM_TRANSFORMS_SCALAR_CONSTANT_PROPOGATION_H
#include "llvm/Pass.h"
+#include "llvm/BasicBlock.h"
class TerminatorInst;
struct ConstantPropogation : public MethodPass {
diff --git a/include/llvm/Transforms/Scalar/DCE.h b/include/llvm/Transforms/Scalar/DCE.h
index 712223e1d0..6fc5287e42 100644
--- a/include/llvm/Transforms/Scalar/DCE.h
+++ b/include/llvm/Transforms/Scalar/DCE.h
@@ -9,7 +9,7 @@
#define LLVM_OPT_DCE_H
#include "llvm/Pass.h"
-#include "llvm/BasicBlock.h"
+#include "llvm/Method.h"
//===----------------------------------------------------------------------===//
// DeadInstElimination - This pass quickly removes trivially dead instructions
@@ -68,13 +68,13 @@ struct DeadCodeElimination : public MethodPass {
// it more successful are removing non-obviously dead instructions.
//
struct AgressiveDCE : public MethodPass {
- // DoADCE - Execute the Agressive Dead Code Elimination Algorithm
- //
- static bool doADCE(Method *M); // Defined in ADCE.cpp
+ virtual bool runOnMethod(Method *M);
- virtual bool runOnMethod(Method *M) {
- return doADCE(M);
- }
+ // getAnalysisUsageInfo - We require post dominance frontiers (aka Control
+ // Dependence Graph)
+ virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Requires,
+ Pass::AnalysisSet &Destroyed,
+ Pass::AnalysisSet &Provided);
};
diff --git a/include/llvm/Transforms/Scalar/IndVarSimplify.h b/include/llvm/Transforms/Scalar/IndVarSimplify.h
index 13f811994b..902483eb8c 100644
--- a/include/llvm/Transforms/Scalar/IndVarSimplify.h
+++ b/include/llvm/Transforms/Scalar/IndVarSimplify.h
@@ -10,10 +10,16 @@
#include "llvm/Pass.h"
+namespace cfg { class LoopInfo; }
+
struct InductionVariableSimplify : public MethodPass {
- static bool doit(Method *M);
+ static bool doit(Method *M, cfg::LoopInfo &Loops);
+
+ virtual bool runOnMethod(Method *M);
- virtual bool runOnMethod(Method *M) { return doit(M); }
+ virtual void getAnalysisUsageInfo(Pass::AnalysisSet &Required,
+ Pass::AnalysisSet &Destroyed,
+ Pass::AnalysisSet &Provided);
};
#endif
diff --git a/include/llvm/Transforms/Scalar/InductionVars.h b/include/llvm/Transforms/Scalar/InductionVars.h
index 4faf3458f6..7c79afaa59 100644
--- a/include/llvm/Transforms/Scalar/InductionVars.h
+++ b/include/llvm/Transforms/Scalar/InductionVars.h
@@ -9,15 +9,19 @@
#define LLVM_OPT_INDUCTION_VARS_H
#include "llvm/Pass.h"
+namespace cfg { class IntervalPartition; }
struct InductionVariableCannonicalize : public MethodPass {
// doInductionVariableCannonicalize - Simplify induction variables in loops
//
- static bool doIt(Method *M);
+ static bool doIt(Method *M, cfg::IntervalPartition &IP);
- virtual bool runOnMethod(Method *M) {
- return doIt(M);
- }
+ virtual bool runOnMethod(Method *M);
+
+ // getAnalysisUsageInfo - Declare that we need IntervalPartitions
+ void getAnalysisUsageInfo(Pass::AnalysisSet &Required,
+ Pass::AnalysisSet &Destroyed,
+ Pass::AnalysisSet &Provided);
};
#endif
diff --git a/include/llvm/Transforms/Scalar/InstructionCombining.h b/include/llvm/Transforms/Scalar/InstructionCombining.h
index c79a1caf4b..0c395720e6 100644
--- a/include/llvm/Transforms/Scalar/InstructionCombining.h
+++ b/include/llvm/Transforms/Scalar/InstructionCombining.h
@@ -16,6 +16,7 @@
#define LLVM_TRANSFORMS_SCALAR_INSTRUCTIONCOMBINING_H
#include "llvm/Pass.h"
+class Instruction;
struct InstructionCombining : public MethodPass {
static bool doit(Method *M);