Skip to content
Snippets Groups Projects
Commit faa42d26 authored by Misha Brukman's avatar Misha Brukman
Browse files

We accept TargetMachine as a const reference.

llvm-svn: 9775
parent bd4a8ed1
No related branches found
No related tags found
No related merge requests found
...@@ -112,7 +112,7 @@ class PeepholeOpts: public BasicBlockPass { ...@@ -112,7 +112,7 @@ class PeepholeOpts: public BasicBlockPass {
bool visit(MachineBasicBlock& mvec, bool visit(MachineBasicBlock& mvec,
MachineBasicBlock::iterator BBI) const; MachineBasicBlock::iterator BBI) const;
public: public:
PeepholeOpts(const TargetMachine &T): target(T) { } PeepholeOpts(const TargetMachine &TM): target(TM) { }
bool runOnBasicBlock(BasicBlock &BB); // apply this pass to each BB bool runOnBasicBlock(BasicBlock &BB); // apply this pass to each BB
virtual const char *getPassName() const { return "Peephole Optimization"; } virtual const char *getPassName() const { return "Peephole Optimization"; }
}; };
...@@ -160,6 +160,6 @@ bool PeepholeOpts::runOnBasicBlock(BasicBlock &BB) { ...@@ -160,6 +160,6 @@ bool PeepholeOpts::runOnBasicBlock(BasicBlock &BB) {
// createPeepholeOptsPass - Public entrypoint for peephole optimization // createPeepholeOptsPass - Public entrypoint for peephole optimization
// and this file as a whole... // and this file as a whole...
// //
FunctionPass* createPeepholeOptsPass(TargetMachine &T) { FunctionPass* createPeepholeOptsPass(const TargetMachine &TM) {
return new PeepholeOpts(T); return new PeepholeOpts(TM);
} }
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment