summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-08-14 06:04:49 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-08-14 06:04:49 +0000
commitcbd3a40626e00ec20d46efca6def0e27113352ca (patch)
tree8957a2a34decd9717e2392476fea77eb792d29f1 /llvm/lib
parentec8519d6b659fa0e50390a33efb49b3e12f9f478 (diff)
downloadbcm5719-llvm-cbd3a40626e00ec20d46efca6def0e27113352ca.tar.gz
bcm5719-llvm-cbd3a40626e00ec20d46efca6def0e27113352ca.zip
Factory methods for function passes now return type FunctionPass *.
Get rid of RegisterLLC, which can't handle FunctionPasses anyway. llvm-svn: 7836
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp7
-rw-r--r--llvm/lib/Target/Sparc/PeepholeOpts.cpp8
2 files changed, 3 insertions, 12 deletions
diff --git a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
index a666c5fe2e1..835169aeeb8 100644
--- a/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
+++ b/llvm/lib/CodeGen/InstrSelection/InstrSelection.cpp
@@ -71,13 +71,10 @@ namespace {
}
bool runOnFunction(Function &F);
+ virtual const char *getPassName() const { return "Instruction Selection"; }
};
}
-// Register the pass...
-static RegisterLLC<InstructionSelection>
-X("instselect", "Instruction Selection", createInstructionSelectionPass);
-
TmpInstruction::TmpInstruction(MachineCodeForInstruction& mcfi,
Value *s1, Value *s2, const std::string &name)
: Instruction(s1->getType(), Instruction::UserOp1, name)
@@ -384,6 +381,6 @@ InstructionSelection::PostprocessMachineCodeForTree(InstructionNode* instrNode,
// createInstructionSelectionPass - Public entrypoint for instruction selection
// and this file as a whole...
//
-Pass *createInstructionSelectionPass(TargetMachine &T) {
+FunctionPass *createInstructionSelectionPass(TargetMachine &T) {
return new InstructionSelection(T);
}
diff --git a/llvm/lib/Target/Sparc/PeepholeOpts.cpp b/llvm/lib/Target/Sparc/PeepholeOpts.cpp
index 73e9ec942a3..3912f4e7629 100644
--- a/llvm/lib/Target/Sparc/PeepholeOpts.cpp
+++ b/llvm/lib/Target/Sparc/PeepholeOpts.cpp
@@ -68,12 +68,6 @@ public:
bool runOnBasicBlock(BasicBlock &BB); // apply this pass to each BB
};
-
-// Register the pass with llc only, and not opt...
-static RegisterLLC<PeepholeOpts>
-X("peephole", "Peephole Optimization", createPeepholeOptsPass);
-
-
/* Apply a list of peephole optimizations to this machine instruction
* within its local context. They are allowed to delete MI or any
* instruction before MI, but not
@@ -128,7 +122,7 @@ PeepholeOpts::runOnBasicBlock(BasicBlock &BB)
// createPeepholeOptsPass - Public entrypoint for peephole optimization
// and this file as a whole...
//
-Pass*
+FunctionPass*
createPeepholeOptsPass(TargetMachine &T)
{
return new PeepholeOpts(T);
OpenPOWER on IntegriCloud