mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-06 06:33:24 +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,
|
||||
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…
x
Reference in New Issue
Block a user