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;
#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
/// 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
#define LLVM_TRANSFORMS_SCALAR_H
class Pass;
+class FunctionPass;
class GetElementPtrInst;
class PassInfo;
class TerminatorInst;
// This pass converts SwitchInst instructions into a sequence of chained binary
// branch instructions.
//
-Pass *createLowerSwitchPass();
+FunctionPass *createLowerSwitchPass();
//===----------------------------------------------------------------------===//
//
};
}
-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();
}
/// 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
return true;
}
-Pass *createLocalRegisterAllocator() {
+FunctionPass *createLocalRegisterAllocator() {
return new RA();
}
return true;
}
-Pass *createSimpleRegisterAllocator() {
+FunctionPass *createSimpleRegisterAllocator() {
return new RegAllocSimple();
}
};
}
-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.
/// 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);
}
/// 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);
}
};
}
-Pass *createX86PeepholeOptimizerPass() { return new PH(); }
+FunctionPass *createX86PeepholeOptimizerPass() { return new PH(); }
bool PH::runOnMachineFunction(MachineFunction &MF) {
bool Changed = false;
};
}
-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.
/// 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);
}
/// 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);
}
};
}
-Pass *createX86PeepholeOptimizerPass() { return new PH(); }
+FunctionPass *createX86PeepholeOptimizerPass() { return new PH(); }
bool PH::runOnMachineFunction(MachineFunction &MF) {
bool Changed = false;
}
// createLowerSwitchPass - Interface to this file...
-Pass *createLowerSwitchPass() {
+FunctionPass *createLowerSwitchPass() {
return new LowerSwitch();
}