summaryrefslogtreecommitdiff
path: root/lib/CodeGen/LiveVariables.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2013-07-11 16:22:38 +0000
committerCraig Topper <craig.topper@gmail.com>2013-07-11 16:22:38 +0000
commit9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4 (patch)
treef4aa87a04af2f69d097f9c9ed386fa833cabac39 /lib/CodeGen/LiveVariables.cpp
parent73480481f4ebe05e0b0f7d5eabd8f8f34b6823f1 (diff)
downloadllvm-9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4.tar.gz
llvm-9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4.tar.bz2
llvm-9e639e8fd95488cb4c8ef2f7f3a41919acb29ac4.tar.xz
Use SmallVectorImpl& instead of SmallVector to avoid repeating small vector size.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@186098 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/LiveVariables.cpp')
-rw-r--r--lib/CodeGen/LiveVariables.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/LiveVariables.cpp b/lib/CodeGen/LiveVariables.cpp
index 6f75700f13..ed55d7ad10 100644
--- a/lib/CodeGen/LiveVariables.cpp
+++ b/lib/CodeGen/LiveVariables.cpp
@@ -441,7 +441,7 @@ void LiveVariables::HandleRegMask(const MachineOperand &MO) {
}
void LiveVariables::HandlePhysRegDef(unsigned Reg, MachineInstr *MI,
- SmallVector<unsigned, 4> &Defs) {
+ SmallVectorImpl<unsigned> &Defs) {
// What parts of the register are previously defined?
SmallSet<unsigned, 32> Live;
if (PhysRegDef[Reg] || PhysRegUse[Reg]) {
@@ -484,7 +484,7 @@ void LiveVariables::HandlePhysRegDef(unsigned Reg, MachineInstr *MI,
}
void LiveVariables::UpdatePhysRegDefs(MachineInstr *MI,
- SmallVector<unsigned, 4> &Defs) {
+ SmallVectorImpl<unsigned> &Defs) {
while (!Defs.empty()) {
unsigned Reg = Defs.back();
Defs.pop_back();