Add a function to Passes.h to allow clients to create instances

of the ScalarEvolution pass without needing to #include ScalarEvolution.h.

llvm-svn: 85716
This commit is contained in:
Dan Gohman 2009-11-01 15:28:36 +00:00
parent b49c889d53
commit 2b12b95d5d
2 changed files with 9 additions and 0 deletions

View File

@ -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();

View File

@ -5151,6 +5151,8 @@ ScalarEvolution::SCEVCallbackVH::SCEVCallbackVH(Value *V, ScalarEvolution *se)
// ScalarEvolution Class Implementation
//===----------------------------------------------------------------------===//
FunctionPass *createScalarEvolutionPass() { return new ScalarEvolution(); }
ScalarEvolution::ScalarEvolution()
: FunctionPass(&ID) {
}