aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
diff options
context:
space:
mode:
authorRafael Espindola <rafael.espindola@gmail.com>2008-08-28 18:29:58 +0000
committerRafael Espindola <rafael.espindola@gmail.com>2008-08-28 18:29:58 +0000
commit91ee5454ae8f15de769a7316b4c36734b6103e45 (patch)
tree62123ad917b699acfb27449a7a1c7abee3c07610 /lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
parentc0bb68b98267c75168e6596d20610a8a8b3c0635 (diff)
Reduce the size of the Parts vector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@55483 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 34878f3442..2f43222760 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -4014,7 +4014,7 @@ SDValue RegsForValue::getCopyFromRegs(SelectionDAG &DAG,
unsigned NumRegs = TLI->getNumRegisters(ValueVT);
MVT RegisterVT = RegVTs[Value];
- Parts.resize(Part + NumRegs);
+ Parts.resize(NumRegs);
for (unsigned i = 0; i != NumRegs; ++i) {
SDValue P;
if (Flag == 0)
@@ -4067,12 +4067,13 @@ SDValue RegsForValue::getCopyFromRegs(SelectionDAG &DAG,
}
}
- Parts[Part+i] = P;
+ Parts[i] = P;
}
- Values[Value] = getCopyFromParts(DAG, &Parts[Part], NumRegs, RegisterVT,
+ Values[Value] = getCopyFromParts(DAG, Parts.begin(), NumRegs, RegisterVT,
ValueVT);
Part += NumRegs;
+ Parts.clear();
}
return DAG.getMergeValues(DAG.getVTList(&ValueVTs[0], ValueVTs.size()),