mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-09-21 18:26:41 +00:00
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185512 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -197,7 +197,7 @@ void StackSlotColoring::InitializeSlots() {
|
||||
/// LiveIntervals that have already been assigned to the specified color.
|
||||
bool
|
||||
StackSlotColoring::OverlapWithAssignments(LiveInterval *li, int Color) const {
|
||||
const SmallVector<LiveInterval*,4> &OtherLIs = Assignments[Color];
|
||||
const SmallVectorImpl<LiveInterval *> &OtherLIs = Assignments[Color];
|
||||
for (unsigned i = 0, e = OtherLIs.size(); i != e; ++i) {
|
||||
LiveInterval *OtherLI = OtherLIs[i];
|
||||
if (OtherLI->overlaps(*li))
|
||||
@@ -297,7 +297,7 @@ bool StackSlotColoring::ColorSlots(MachineFunction &MF) {
|
||||
if (NewFI == -1 || (NewFI == (int)SS))
|
||||
continue;
|
||||
|
||||
SmallVector<MachineInstr*, 8> &RefMIs = SSRefs[SS];
|
||||
SmallVectorImpl<MachineInstr*> &RefMIs = SSRefs[SS];
|
||||
for (unsigned i = 0, e = RefMIs.size(); i != e; ++i)
|
||||
RewriteInstruction(RefMIs[i], SS, NewFI, MF);
|
||||
}
|
||||
@@ -378,7 +378,7 @@ bool StackSlotColoring::RemoveDeadStores(MachineBasicBlock* MBB) {
|
||||
++I;
|
||||
}
|
||||
|
||||
for (SmallVector<MachineInstr*, 4>::iterator I = toErase.begin(),
|
||||
for (SmallVectorImpl<MachineInstr *>::iterator I = toErase.begin(),
|
||||
E = toErase.end(); I != E; ++I)
|
||||
(*I)->eraseFromParent();
|
||||
|
||||
|
Reference in New Issue
Block a user