mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-18 12:29:21 +00:00
We accept TargetMachine as a const reference.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9775 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
7eabdc5fb8
commit
941fc9acd9
@ -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) {
|
|||||||
// 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);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user