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 | 14a05df97b5e55e40c1066732b32f2ee2c55600e (patch) | |
| tree | d6c688a233b0dea1dd4dd56ed0235ef748b79438 /llvm/lib/CodeGen/SelectionDAG | |
| parent | 2d9cc2197adffe45caf41eda52399ce685c93578 (diff) | |
| download | bcm5719-llvm-14a05df97b5e55e40c1066732b32f2ee2c55600e.tar.gz bcm5719-llvm-14a05df97b5e55e40c1066732b32f2ee2c55600e.zip | |
Don't call size() on each iteration of the loop.
llvm-svn: 50361
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG')
| -rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 500caaf71c9..f883209b568 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/llvm/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); |

