diff options
author | Dan Gohman <gohman@apple.com> | 2008-04-28 17:42:03 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2008-04-28 17:42:03 +0000 |
commit | 3a163d253056f54c7b4430487a8fe34300ab94fa (patch) | |
tree | 720d67e3847a03e5424c24b366498a203d17e39c /lib | |
parent | addecfc56c5c897f0b4f866ed5c4a8d2a3997a80 (diff) | |
download | external_llvm-3a163d253056f54c7b4430487a8fe34300ab94fa.zip external_llvm-3a163d253056f54c7b4430487a8fe34300ab94fa.tar.gz external_llvm-3a163d253056f54c7b4430487a8fe34300ab94fa.tar.bz2 |
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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 500caaf..f883209 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); |