Factory methods for FunctionPasses now return type FunctionPass *.
authorBrian Gaeke <gaeke@uiuc.edu>
Wed, 13 Aug 2003 18:18:15 +0000 (18:18 +0000)
committerBrian Gaeke <gaeke@uiuc.edu>
Wed, 13 Aug 2003 18:18:15 +0000 (18:18 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@7823 91177308-0d34-0410-b5e6-96231b3b80d8

16 files changed:
include/llvm/CodeGen/MachineFunction.h
include/llvm/CodeGen/Passes.h
include/llvm/Transforms/Scalar.h
lib/CodeGen/MachineFunction.cpp
lib/CodeGen/PrologEpilogInserter.cpp
lib/CodeGen/RegAllocLocal.cpp
lib/CodeGen/RegAllocSimple.cpp
lib/Target/X86/FloatingPoint.cpp
lib/Target/X86/InstSelectPattern.cpp
lib/Target/X86/InstSelectSimple.cpp
lib/Target/X86/PeepholeOptimizer.cpp
lib/Target/X86/X86FloatingPoint.cpp
lib/Target/X86/X86ISelPattern.cpp
lib/Target/X86/X86ISelSimple.cpp
lib/Target/X86/X86PeepholeOpt.cpp
lib/Transforms/Utils/LowerSwitch.cpp

index db6c1ca378572ae842daaa66c4aa8146d14cd02d..4adb48c4aa72d6f5527383ced1612f780e175902 100644 (file)
 
 class Function;
 class TargetMachine;
-class Pass;
+class FunctionPass;
 class SSARegMap;
 class MachineFunctionInfo;
 class MachineFrameInfo;
 class MachineConstantPool;
 
-Pass *createMachineCodeConstructionPass(TargetMachine &TM);
-Pass *createMachineCodeDestructionPass();
-Pass *createMachineFunctionPrinterPass();
+FunctionPass *createMachineCodeConstructionPass(TargetMachine &TM);
+FunctionPass *createMachineCodeDestructionPass();
+FunctionPass *createMachineFunctionPrinterPass();
 
 class MachineFunction : private Annotation {
   const Function *Fn;
index 9057fd0268c19aa554fdef69ce2c2c4082a0bc54..00dbfe29c8e98315472eb63b428e931dabf15a66 100644 (file)
@@ -8,7 +8,7 @@
 #ifndef LLVM_CODEGEN_PASSES_H
 #define LLVM_CODEGEN_PASSES_H
 
-class Pass;
+class FunctionPass;
 class PassInfo;
 
 // PHIElimination pass - This pass eliminates machine instruction PHI nodes by
@@ -22,17 +22,17 @@ extern const PassInfo *PHIEliminationID;
 /// from SSA form to use explicit registers by spilling every register.  Wow,
 /// great policy huh?
 ///
-Pass *createSimpleRegisterAllocator();
+FunctionPass *createSimpleRegisterAllocator();
 
 /// LocalRegisterAllocation Pass - This pass register allocates the input code a
 /// basic block at a time, yielding code better than the simple register
 /// allocator, but not as good as a global allocator.
 /// 
-Pass *createLocalRegisterAllocator();
+FunctionPass *createLocalRegisterAllocator();
 
 /// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code,
 /// and eliminates abstract frame references.
 ///
-Pass *createPrologEpilogCodeInserter();
+FunctionPass *createPrologEpilogCodeInserter();
 
 #endif
index 8a29079835bddcad2fa71b85de6ed7c629ab42b2..2ee3c46cba96f1b5bcdc492f851d15358a6d15f4 100644 (file)
@@ -9,6 +9,7 @@
 #define LLVM_TRANSFORMS_SCALAR_H
 
 class Pass;
+class FunctionPass;
 class GetElementPtrInst;
 class PassInfo;
 class TerminatorInst;
@@ -244,7 +245,7 @@ Pass *createRaiseAllocationsPass();
 // This pass converts SwitchInst instructions into a sequence of chained binary
 // branch instructions.
 //
-Pass *createLowerSwitchPass();
+FunctionPass *createLowerSwitchPass();
 
 //===----------------------------------------------------------------------===//
 //
index 85bf4b6a272702e3aba13f4f0a40f7530aedb4b6..f7aadc317e23e67a27751a2e4b34de34b7a403b6 100644 (file)
@@ -80,15 +80,15 @@ namespace {
   };
 }
 
-Pass *createMachineCodeConstructionPass(TargetMachine &Target) {
+FunctionPass *createMachineCodeConstructionPass(TargetMachine &Target) {
   return new ConstructMachineFunction(Target);
 }
 
-Pass *createMachineCodeDestructionPass() {
+FunctionPass *createMachineCodeDestructionPass() {
   return new DestroyMachineFunction();
 }
 
-Pass *createMachineFunctionPrinterPass() {
+FunctionPass *createMachineFunctionPrinterPass() {
   return new Printer();
 }
 
index 06de9bf0240f559eb047a0f7588ce59133e26b84..13cd353362a075a942563ca9a584dddaa34fcc45 100644 (file)
@@ -62,7 +62,7 @@ namespace {
 /// createPrologEpilogCodeInserter - This function returns a pass that inserts
 /// prolog and epilog code, and eliminates abstract frame references.
 ///
-Pass *createPrologEpilogCodeInserter() { return new PEI(); }
+FunctionPass *createPrologEpilogCodeInserter() { return new PEI(); }
 
 
 /// saveCallerSavedRegisters - Scan the function for modified caller saved
index 1b84b30f57f0970c5c02f017f663f69850d2f607..26269e1808ca99867f0b7306783fcd0713063f8a 100644 (file)
@@ -643,6 +643,6 @@ bool RA::runOnMachineFunction(MachineFunction &Fn) {
   return true;
 }
 
-Pass *createLocalRegisterAllocator() {
+FunctionPass *createLocalRegisterAllocator() {
   return new RA();
 }
index cb08986d143f5e0cee853669bb5a3a971af20af0..ba571e4116e4692fe3e22d5972d117838018b43c 100644 (file)
@@ -224,6 +224,6 @@ bool RegAllocSimple::runOnMachineFunction(MachineFunction &Fn) {
   return true;
 }
 
-Pass *createSimpleRegisterAllocator() {
+FunctionPass *createSimpleRegisterAllocator() {
   return new RegAllocSimple();
 }
index f451a23477213fc35b3336e4336dc0ee1509ab1f..d620599fb13089704dc6898503353ac6a9327d7c 100644 (file)
@@ -117,7 +117,7 @@ namespace {
   };
 }
 
-Pass *createX86FloatingPointStackifierPass() { return new FPS(); }
+FunctionPass *createX86FloatingPointStackifierPass() { return new FPS(); }
 
 /// runOnMachineFunction - Loop over all of the basic blocks, transforming FP
 /// register references into FP stack references.
index 4b9e381ec173fadf20d8074727390fb69689b801..680cc8fc6c726af8dd428f7f481585c3db3b1f88 100644 (file)
@@ -112,6 +112,6 @@ void ISel::expandArguments(SelectionDAG &SD, MachineFunction &F) {
 /// into a machine code representation using pattern matching and a machine
 /// description file.
 ///
-Pass *createX86PatternInstructionSelector(TargetMachine &TM) {
+FunctionPass *createX86PatternInstructionSelector(TargetMachine &TM) {
   return new ISel(TM);  
 }
index d66f7c225e49ee7d712af05f3a433a3fbd1ab848..2cc4e8367dfbdb5114695d258fcc86a7f6ea3a64 100644 (file)
@@ -2105,6 +2105,6 @@ void ISel::visitFreeInst(FreeInst &I) {
 /// into a machine code representation is a very simple peep-hole fashion.  The
 /// generated code sucks but the implementation is nice and simple.
 ///
-Pass *createX86SimpleInstructionSelector(TargetMachine &TM) {
+FunctionPass *createX86SimpleInstructionSelector(TargetMachine &TM) {
   return new ISel(TM);
 }
index ae7c0621e17a5fa3cbdebae881e2d3b107166db5..559baeeae9d1b6080f5321fca26b11dfc7f2a70b 100644 (file)
@@ -19,7 +19,7 @@ namespace {
   };
 }
 
-Pass *createX86PeepholeOptimizerPass() { return new PH(); }
+FunctionPass *createX86PeepholeOptimizerPass() { return new PH(); }
 
 bool PH::runOnMachineFunction(MachineFunction &MF) {
   bool Changed = false;
index f451a23477213fc35b3336e4336dc0ee1509ab1f..d620599fb13089704dc6898503353ac6a9327d7c 100644 (file)
@@ -117,7 +117,7 @@ namespace {
   };
 }
 
-Pass *createX86FloatingPointStackifierPass() { return new FPS(); }
+FunctionPass *createX86FloatingPointStackifierPass() { return new FPS(); }
 
 /// runOnMachineFunction - Loop over all of the basic blocks, transforming FP
 /// register references into FP stack references.
index 4b9e381ec173fadf20d8074727390fb69689b801..680cc8fc6c726af8dd428f7f481585c3db3b1f88 100644 (file)
@@ -112,6 +112,6 @@ void ISel::expandArguments(SelectionDAG &SD, MachineFunction &F) {
 /// into a machine code representation using pattern matching and a machine
 /// description file.
 ///
-Pass *createX86PatternInstructionSelector(TargetMachine &TM) {
+FunctionPass *createX86PatternInstructionSelector(TargetMachine &TM) {
   return new ISel(TM);  
 }
index d66f7c225e49ee7d712af05f3a433a3fbd1ab848..2cc4e8367dfbdb5114695d258fcc86a7f6ea3a64 100644 (file)
@@ -2105,6 +2105,6 @@ void ISel::visitFreeInst(FreeInst &I) {
 /// into a machine code representation is a very simple peep-hole fashion.  The
 /// generated code sucks but the implementation is nice and simple.
 ///
-Pass *createX86SimpleInstructionSelector(TargetMachine &TM) {
+FunctionPass *createX86SimpleInstructionSelector(TargetMachine &TM) {
   return new ISel(TM);
 }
index ae7c0621e17a5fa3cbdebae881e2d3b107166db5..559baeeae9d1b6080f5321fca26b11dfc7f2a70b 100644 (file)
@@ -19,7 +19,7 @@ namespace {
   };
 }
 
-Pass *createX86PeepholeOptimizerPass() { return new PH(); }
+FunctionPass *createX86PeepholeOptimizerPass() { return new PH(); }
 
 bool PH::runOnMachineFunction(MachineFunction &MF) {
   bool Changed = false;
index f71c08c3cfde4cee2b7fcd43294ac1bc3330656c..c0e9e0dcd33ee973c17e2cb5a8f24351589eec84 100644 (file)
@@ -30,7 +30,7 @@ namespace {
 }
 
 // createLowerSwitchPass - Interface to this file...
-Pass *createLowerSwitchPass() {
+FunctionPass *createLowerSwitchPass() {
   return new LowerSwitch();
 }