Add pass ID's for various passes, so they can be AddRequiredID. Patch by
authorChris Lattner <sabre@nondot.org>
Tue, 2 May 2006 04:24:36 +0000 (04:24 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 2 May 2006 04:24:36 +0000 (04:24 +0000)
Domagoj Babic!

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28048 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Transforms/Scalar.h
lib/Transforms/Utils/LowerAllocations.cpp
lib/Transforms/Utils/LowerSelect.cpp
lib/Transforms/Utils/LowerSwitch.cpp
lib/Transforms/Utils/Mem2Reg.cpp

index 502c5d34fa8989b808911ff38419f1c174e18f5b..3ae134857da1a0f263ebc7162a50afc2d56d4a33 100644 (file)
@@ -163,6 +163,7 @@ FunctionPass *createLoopUnrollPass();
 //   ret int %Y
 //
 FunctionPass *createPromoteMemoryToRegisterPass();
+extern const PassInfo *PromoteMemoryToRegisterID;
 
 //===----------------------------------------------------------------------===//
 //
@@ -240,31 +241,36 @@ FunctionPass *createLoopSimplifyPass();
 extern const PassInfo *LoopSimplifyID;
 
 //===----------------------------------------------------------------------===//
+// This pass converts SelectInst instructions into conditional branch and PHI
+// instructions.  If the OnlyFP flag is set to true, then only floating point
+// select instructions are lowered.
 //
-// This pass eliminates call instructions to the current function which occur
-// immediately before return instructions.
-//
-FunctionPass *createTailCallEliminationPass();
-
+FunctionPass *createLowerSelectPass(bool OnlyFP = false);
+extern const PassInfo *LowerSelectID;
 
 //===----------------------------------------------------------------------===//
-// This pass convert malloc and free instructions to %malloc & %free function
-// calls.
+//
+// LowerAllocations Pass - Turn malloc and free instructions into %malloc and
+// %free calls.
+//
+//   AU.addRequiredID(LowerAllocationsID);
 //
 FunctionPass *createLowerAllocationsPass(bool LowerMallocArgToInteger = false);
+extern const PassInfo *LowerAllocationsID;
 
 //===----------------------------------------------------------------------===//
-// This pass converts SwitchInst instructions into a sequence of chained binary
-// branch instructions.
 //
-FunctionPass *createLowerSwitchPass();
+// This pass eliminates call instructions to the current function which occur
+// immediately before return instructions.
+//
+FunctionPass *createTailCallEliminationPass();
 
 //===----------------------------------------------------------------------===//
-// This pass converts SelectInst instructions into conditional branch and PHI
-// instructions.  If the OnlyFP flag is set to true, then only floating point
-// select instructions are lowered.
+// This pass converts SwitchInst instructions into a sequence of chained binary
+// branch instructions.
 //
-FunctionPass *createLowerSelectPass(bool OnlyFP = false);
+FunctionPass *createLowerSwitchPass();
+extern const PassInfo *LowerSwitchID;
 
 //===----------------------------------------------------------------------===//
 // This pass converts PackedType operations into low-level scalar operations.
index f1721b3e5872e7dca3110831793b7988ab6b1dff..0a6dc09147e8c6d2fcf8d20bd2c86d737d9f8978 100644 (file)
@@ -60,6 +60,8 @@ namespace {
   X("lowerallocs", "Lower allocations from instructions to calls");
 }
 
+// Publically exposed interface to pass...
+const PassInfo *llvm::LowerAllocationsID = X.getPassInfo();
 // createLowerAllocationsPass - Interface to this file...
 FunctionPass *llvm::createLowerAllocationsPass(bool LowerMallocArgToInteger) {
   return new LowerAllocations(LowerMallocArgToInteger);
index 7555768293560a4133f0fa402405a8ee9dd5f531..6a24c294cfdef477e04a863a68984123c0c5eb80 100644 (file)
@@ -47,6 +47,8 @@ namespace {
   X("lowerselect", "Lower select instructions to branches");
 }
 
+// Publically exposed interface to pass...
+const PassInfo *llvm::LowerSelectID = X.getPassInfo();
 //===----------------------------------------------------------------------===//
 // This pass converts SelectInst instructions into conditional branch and PHI
 // instructions.  If the OnlyFP flag is set to true, then only floating point
index a6b3f28795b546263f7fdb30fb2d748f38772721..ebad6c36dbc7bf0558fbe5b15c5f1ced1c18f1fd 100644 (file)
@@ -60,6 +60,8 @@ namespace {
   X("lowerswitch", "Lower SwitchInst's to branches");
 }
 
+// Publically exposed interface to pass...
+const PassInfo *llvm::LowerSwitchID = X.getPassInfo();
 // createLowerSwitchPass - Interface to this file...
 FunctionPass *llvm::createLowerSwitchPass() {
   return new LowerSwitch();
index 77c72fe447966c5b2e9fb14fcf938afbea842261..c15d10c824ef8f8ad6383b87b36e2877f9998a15 100644 (file)
@@ -74,6 +74,8 @@ bool PromotePass::runOnFunction(Function &F) {
   return Changed;
 }
 
+// Publically exposed interface to pass...
+const PassInfo *llvm::PromoteMemoryToRegisterID = X.getPassInfo();
 // createPromoteMemoryToRegister - Provide an entry point to create this pass.
 //
 FunctionPass *llvm::createPromoteMemoryToRegisterPass() {