mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-07 11:51:13 +00:00
We accept TargetMachine as a const reference.
llvm-svn: 9775
This commit is contained in:
parent
c866cfb251
commit
3f43ed6586
@ -112,7 +112,7 @@ class PeepholeOpts: public BasicBlockPass {
|
||||
bool visit(MachineBasicBlock& mvec,
|
||||
MachineBasicBlock::iterator BBI) const;
|
||||
public:
|
||||
PeepholeOpts(const TargetMachine &T): target(T) { }
|
||||
PeepholeOpts(const TargetMachine &TM): target(TM) { }
|
||||
bool runOnBasicBlock(BasicBlock &BB); // apply this pass to each BB
|
||||
virtual const char *getPassName() const { return "Peephole Optimization"; }
|
||||
};
|
||||
@ -160,6 +160,6 @@ bool PeepholeOpts::runOnBasicBlock(BasicBlock &BB) {
|
||||
// createPeepholeOptsPass - Public entrypoint for peephole optimization
|
||||
// and this file as a whole...
|
||||
//
|
||||
FunctionPass* createPeepholeOptsPass(TargetMachine &T) {
|
||||
return new PeepholeOpts(T);
|
||||
FunctionPass* createPeepholeOptsPass(const TargetMachine &TM) {
|
||||
return new PeepholeOpts(TM);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user