mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-26 12:20:42 +00:00
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186274 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -84,11 +84,11 @@ namespace {
|
||||
bool hasLivePhysRegDefUses(const MachineInstr *MI,
|
||||
const MachineBasicBlock *MBB,
|
||||
SmallSet<unsigned,8> &PhysRefs,
|
||||
SmallVector<unsigned,2> &PhysDefs,
|
||||
SmallVectorImpl<unsigned> &PhysDefs,
|
||||
bool &PhysUseDef) const;
|
||||
bool PhysRegDefsReach(MachineInstr *CSMI, MachineInstr *MI,
|
||||
SmallSet<unsigned,8> &PhysRefs,
|
||||
SmallVector<unsigned,2> &PhysDefs,
|
||||
SmallVectorImpl<unsigned> &PhysDefs,
|
||||
bool &NonLocal) const;
|
||||
bool isCSECandidate(MachineInstr *MI);
|
||||
bool isProfitableToCSE(unsigned CSReg, unsigned Reg,
|
||||
@@ -193,7 +193,7 @@ MachineCSE::isPhysDefTriviallyDead(unsigned Reg,
|
||||
bool MachineCSE::hasLivePhysRegDefUses(const MachineInstr *MI,
|
||||
const MachineBasicBlock *MBB,
|
||||
SmallSet<unsigned,8> &PhysRefs,
|
||||
SmallVector<unsigned,2> &PhysDefs,
|
||||
SmallVectorImpl<unsigned> &PhysDefs,
|
||||
bool &PhysUseDef) const{
|
||||
// First, add all uses to PhysRefs.
|
||||
for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) {
|
||||
@@ -244,7 +244,7 @@ bool MachineCSE::hasLivePhysRegDefUses(const MachineInstr *MI,
|
||||
|
||||
bool MachineCSE::PhysRegDefsReach(MachineInstr *CSMI, MachineInstr *MI,
|
||||
SmallSet<unsigned,8> &PhysRefs,
|
||||
SmallVector<unsigned,2> &PhysDefs,
|
||||
SmallVectorImpl<unsigned> &PhysDefs,
|
||||
bool &NonLocal) const {
|
||||
// For now conservatively returns false if the common subexpression is
|
||||
// not in the same basic block as the given instruction. The only exception
|
||||
|
||||
Reference in New Issue
Block a user