aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-11-01 15:28:36 +0000
committerDan Gohman <gohman@apple.com>2009-11-01 15:28:36 +0000
commit2166f6229042a4d3d65847ebe0d453cd664682ef (patch)
treed56d7284eb9db0a459286385dbaad5f28d6f3256
parent34e9d7b6be970b4a6aae876e3c40a4151da67e6e (diff)
Add a function to Passes.h to allow clients to create instances
of the ScalarEvolution pass without needing to #include ScalarEvolution.h. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@85716 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/Passes.h7
-rw-r--r--lib/Analysis/ScalarEvolution.cpp2
2 files changed, 9 insertions, 0 deletions
diff --git a/include/llvm/Analysis/Passes.h b/include/llvm/Analysis/Passes.h
index 66ab3ea5ca..b7c5d55e82 100644
--- a/include/llvm/Analysis/Passes.h
+++ b/include/llvm/Analysis/Passes.h
@@ -147,6 +147,13 @@ namespace llvm {
//
LoopPass *createLoopDependenceAnalysisPass();
+ //===--------------------------------------------------------------------===//
+ //
+ // createScalarEvolutionPass - This creates an instance of the
+ // ScalarEvolution pass.
+ //
+ FunctionPass *createScalarEvolutionPass();
+
// Minor pass prototypes, allowing us to expose them through bugpoint and
// analyze.
FunctionPass *createInstCountPass();
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index 3e87ca22be..e330c8da5a 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -5151,6 +5151,8 @@ ScalarEvolution::SCEVCallbackVH::SCEVCallbackVH(Value *V, ScalarEvolution *se)
// ScalarEvolution Class Implementation
//===----------------------------------------------------------------------===//
+FunctionPass *createScalarEvolutionPass() { return new ScalarEvolution(); }
+
ScalarEvolution::ScalarEvolution()
: FunctionPass(&ID) {
}