Factory methods for function passes now return type FunctionPass *.
authorBrian Gaeke <gaeke@uiuc.edu>
Thu, 14 Aug 2003 06:09:32 +0000 (06:09 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Thu, 14 Aug 2003 06:09:32 +0000 (06:09 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7839 91177308-0d34-0410-b5e6-96231b3b80d8

12 files changed:
include/llvm/CodeGen/InstrScheduling.h
include/llvm/CodeGen/InstrSelection.h
include/llvm/CodeGen/PeepholeOpts.h
include/llvm/CodeGen/RegisterAllocation.h
include/llvm/Transforms/Scalar.h
lib/CodeGen/InstrSched/InstrScheduling.cpp
lib/CodeGen/RegAlloc/PhyRegAlloc.cpp
lib/Target/SparcV9/InstrSched/InstrScheduling.cpp
lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
lib/Target/SparcV9/SparcV9PrologEpilogInserter.cpp
lib/Transforms/Scalar/DecomposeMultiDimRefs.cpp
lib/Transforms/Utils/LowerAllocations.cpp

index e01dfe70c9b835c99c208e8c8e9c76e260fbf976..1e9c0dcf500157cb8378e535865048b9a9fb815e 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef LLVM_CODEGEN_INSTR_SCHEDULING_H
 #define LLVM_CODEGEN_INSTR_SCHEDULING_H
 
-class Pass;
+class FunctionPass;
 class TargetMachine;
 
 //---------------------------------------------------------------------------
@@ -21,6 +21,6 @@ class TargetMachine;
 //   are still in SSA form.
 //---------------------------------------------------------------------------
 
-Pass *createInstructionSchedulingWithSSAPass(const TargetMachine &Target);
+FunctionPass *createInstructionSchedulingWithSSAPass(const TargetMachine &Target);
 
 #endif
index 03999db3d08a1d01c08cdabfab1c7ea10bc5effe..03e9af416764aeb1c11f9c9e35b5aa5ca30d7172 100644 (file)
@@ -15,7 +15,7 @@ class MachineInstr;
 class InstructionNode;
 class TargetMachine;
 class MachineCodeForInstruction;
-class Pass;
+class FunctionPass;
 
 //===--------------------- Required Functions ---------------------------------
 // Target-dependent functions that MUST be implemented for each target.
@@ -43,7 +43,7 @@ extern bool   ThisIsAChainRule        (int eruleno);
 //   Return a pass that performs machine dependant instruction selection.
 //---------------------------------------------------------------------------
 
-Pass *createInstructionSelectionPass(TargetMachine &Target);
+FunctionPass *createInstructionSelectionPass(TargetMachine &Target);
 
 
 //************************ Exported Data Types *****************************/
index fc3254dc67b5993c458add109a4f8ffabab52438..2cbc7782f578e607fa3e75d3a3514e7d66f0243f 100644 (file)
@@ -8,8 +8,8 @@
 #define LLVM_CODEGEN_PEEPHOLE_OPTS_H
 
 class TargetMachine;
-class Pass;
+class FunctionPass;
 
-Pass *createPeepholeOptsPass(TargetMachine &Target);
+FunctionPass *createPeepholeOptsPass(TargetMachine &Target);
 
 #endif
index a0e5da8a756a5f280c4ac2f0e0379cb283128cb6..572c32561041e9adc17d05b542b1985bb4d1b674 100644 (file)
@@ -7,13 +7,13 @@
 #ifndef LLVM_CODEGEN_REGISTERALLOCATION_H
 #define LLVM_CODEGEN_REGISTERALLOCATION_H
 
-class Pass;
+class FunctionPass;
 class TargetMachine;
 
 //----------------------------------------------------------------------------
 // Entry point for register allocation for a module
 //----------------------------------------------------------------------------
 
-Pass *getRegisterAllocator(TargetMachine &T);
+FunctionPass *getRegisterAllocator(TargetMachine &T);
 
 #endif
index 2ee3c46cba96f1b5bcdc492f851d15358a6d15f4..58dcd428acc0798b271b1dff1507b73beb0991bd 100644 (file)
@@ -72,7 +72,7 @@ Pass *createScalarReplAggregatesPass();
 // index of [0]).
 
 // This pass decomposes all multi-dimensional references in a function.
-Pass *createDecomposeMultiDimRefsPass();
+FunctionPass *createDecomposeMultiDimRefsPass();
 
 // This function decomposes a single instance of such a reference.
 // Return value: true if the instruction was replaced; false otherwise.
@@ -238,7 +238,7 @@ extern const PassInfo *LoopPreheadersID;
 // These two passes convert malloc and free instructions to and from %malloc &
 // %free function calls.
 //
-Pass *createLowerAllocationsPass();
+FunctionPass *createLowerAllocationsPass();
 Pass *createRaiseAllocationsPass();
 
 //===----------------------------------------------------------------------===//
index e8778220cbaa87692d47f1532977d1e941c8d01a..a6222d62a07c3f99dcfd1c7591c9deda082315a9 100644 (file)
@@ -1491,6 +1491,6 @@ bool InstructionSchedulingWithSSA::runOnFunction(Function &F)
 }
 
 
-Pass *createInstructionSchedulingWithSSAPass(const TargetMachine &tgt) {
+FunctionPass *createInstructionSchedulingWithSSAPass(const TargetMachine &tgt) {
   return new InstructionSchedulingWithSSA(tgt);
 }
index fa81e9e33f68de92688e247810d3a1d806e5320f..6d40e1d082461a25d3c36a173d6ebd60f86f4d04 100644 (file)
@@ -74,7 +74,7 @@ namespace {
   };
 }
 
-Pass *getRegisterAllocator(TargetMachine &T) {
+FunctionPass *getRegisterAllocator(TargetMachine &T) {
   return new RegisterAllocator(T);
 }
 
index e8778220cbaa87692d47f1532977d1e941c8d01a..a6222d62a07c3f99dcfd1c7591c9deda082315a9 100644 (file)
@@ -1491,6 +1491,6 @@ bool InstructionSchedulingWithSSA::runOnFunction(Function &F)
 }
 
 
-Pass *createInstructionSchedulingWithSSAPass(const TargetMachine &tgt) {
+FunctionPass *createInstructionSchedulingWithSSAPass(const TargetMachine &tgt) {
   return new InstructionSchedulingWithSSA(tgt);
 }
index fa81e9e33f68de92688e247810d3a1d806e5320f..6d40e1d082461a25d3c36a173d6ebd60f86f4d04 100644 (file)
@@ -74,7 +74,7 @@ namespace {
   };
 }
 
-Pass *getRegisterAllocator(TargetMachine &T) {
+FunctionPass *getRegisterAllocator(TargetMachine &T) {
   return new RegisterAllocator(T);
 }
 
index de04cb651759ffa22cdb4d048d4cf4e2a1997284..b74c7df344f3d1d9712ccb0bdcae5fa7e7ae7cde 100644 (file)
@@ -167,6 +167,6 @@ void InsertPrologEpilogCode::InsertEpilogCode(MachineFunction &MF)
   }
 }
 
-Pass* UltraSparc::getPrologEpilogInsertionPass() {
+FunctionPass *UltraSparc::getPrologEpilogInsertionPass() {
   return new InsertPrologEpilogCode();
 }
index 65cf465acd9134b8d0b9793103acb29d1513e00a..79b6aead20d0a77c8ec3985bdc6c70a8e22c3ebd 100644 (file)
@@ -29,7 +29,7 @@ namespace {
 RegisterOpt<DecomposePass> X("lowerrefs", "Decompose multi-dimensional "
                              "structure/array references");
 
-Pass
+FunctionPass
 *createDecomposeMultiDimRefsPass()
 {
   return new DecomposePass();
index c5014b48e6a8a5df27f073ab8c843d31838d54b0..53584d9d3e3723eaae0cb0ca5db3bc4c0b7742a7 100644 (file)
@@ -47,7 +47,7 @@ namespace {
 }
 
 // createLowerAllocationsPass - Interface to this file...
-Pass *createLowerAllocationsPass() {
+FunctionPass *createLowerAllocationsPass() {
   return new LowerAllocations();
 }