Add a function to Passes.h to allow clients to create instances
authorDan Gohman <gohman@apple.com>
Sun, 1 Nov 2009 15:28:36 +0000 (15:28 +0000)
committerDan Gohman <gohman@apple.com>
Sun, 1 Nov 2009 15:28:36 +0000 (15:28 +0000)
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

include/llvm/Analysis/Passes.h
lib/Analysis/ScalarEvolution.cpp

index 66ab3ea5caf1f362676e4c5a60443b6348797efb..b7c5d55e82f7aedc4bc1751112662a8c9d4faeb8 100644 (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();
index 3e87ca22be325607c86ce12077823d2ba8aff488..e330c8da5a984e705837402340ea460a3a4615df 100644 (file)
@@ -5151,6 +5151,8 @@ ScalarEvolution::SCEVCallbackVH::SCEVCallbackVH(Value *V, ScalarEvolution *se)
 //                   ScalarEvolution Class Implementation
 //===----------------------------------------------------------------------===//
 
+FunctionPass *createScalarEvolutionPass() { return new ScalarEvolution(); }
+
 ScalarEvolution::ScalarEvolution()
   : FunctionPass(&ID) {
 }