aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2008-04-28 17:42:03 +0000
committerDan Gohman <gohman@apple.com>2008-04-28 17:42:03 +0000
commitb20d4f8d499c4c5315de69bd22c652665a7e3ab8 (patch)
tree720d67e3847a03e5424c24b366498a203d17e39c
parente2435da8abe5ca62c7f08f29c242b6b98e0ec7af (diff)
Don't call size() on each iteration of the loop.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@50361 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
index 500caaf71c..f883209b56 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -158,7 +158,7 @@ namespace {
unsigned Reg, const Type *Ty) : TLI(&tli) {
ComputeValueVTs(tli, Ty, ValueVTs);
- for (unsigned Value = 0; Value != ValueVTs.size(); ++Value) {
+ for (unsigned Value = 0, e = ValueVTs.size(); Value != e; ++Value) {
MVT::ValueType ValueVT = ValueVTs[Value];
unsigned NumRegs = TLI->getNumRegisters(ValueVT);
MVT::ValueType RegisterVT = TLI->getRegisterType(ValueVT);
@@ -364,7 +364,7 @@ unsigned FunctionLoweringInfo::CreateRegForValue(const Value *V) {
ComputeValueVTs(TLI, V->getType(), ValueVTs);
unsigned FirstReg = 0;
- for (unsigned Value = 0; Value != ValueVTs.size(); ++Value) {
+ for (unsigned Value = 0, e = ValueVTs.size(); Value != e; ++Value) {
MVT::ValueType ValueVT = ValueVTs[Value];
MVT::ValueType RegisterVT = TLI.getRegisterType(ValueVT);