diff options
| author | Craig Topper <craig.topper@gmail.com> | 2013-07-03 05:11:49 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@gmail.com> | 2013-07-03 05:11:49 +0000 |
| commit | e1c1d363a5ea271980fbbfa5a49963b30ab99f62 (patch) | |
| tree | 2ed389427e410a9bc2801e6c1330580f05bca3e5 /llvm/lib/CodeGen/StackSlotColoring.cpp | |
| parent | f3dc0fffb54833133f744199d592e12899059ea1 (diff) | |
| download | bcm5719-llvm-e1c1d363a5ea271980fbbfa5a49963b30ab99f62.tar.gz bcm5719-llvm-e1c1d363a5ea271980fbbfa5a49963b30ab99f62.zip | |
Use SmallVectorImpl instead of SmallVector for iterators and references to avoid specifying the vector size unnecessarily.
llvm-svn: 185512
Diffstat (limited to 'llvm/lib/CodeGen/StackSlotColoring.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/StackSlotColoring.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/StackSlotColoring.cpp b/llvm/lib/CodeGen/StackSlotColoring.cpp index b166671e1ba..9a9b8897ee5 100644 --- a/llvm/lib/CodeGen/StackSlotColoring.cpp +++ b/llvm/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(); |

