summaryrefslogtreecommitdiff
path: root/lib/CodeGen/StackSlotColoring.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-07-03 05:11:49 +0000
committerCraig Topper <craig.topper@gmail.com>2013-07-03 05:11:49 +0000
commitf22fd3f7b557a967b1edc1fa9ae770006a39e97c (patch)
tree2adb341c05cd266b848277bc567e279836a4c95d /lib/CodeGen/StackSlotColoring.cpp
parentd0a3916e430201d0179c723e4ebdd9bf4f0ee02b (diff)
downloadllvm-f22fd3f7b557a967b1edc1fa9ae770006a39e97c.tar.gz
llvm-f22fd3f7b557a967b1edc1fa9ae770006a39e97c.tar.bz2
llvm-f22fd3f7b557a967b1edc1fa9ae770006a39e97c.tar.xz
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
Diffstat (limited to 'lib/CodeGen/StackSlotColoring.cpp')
-rw-r--r--lib/CodeGen/StackSlotColoring.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/CodeGen/StackSlotColoring.cpp b/lib/CodeGen/StackSlotColoring.cpp
index b166671e1b..9a9b8897ee 100644
--- a/lib/CodeGen/StackSlotColoring.cpp
+++ b/lib/CodeGen/StackSlotColoring.cpp
@@ -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();