[llvm-commits] [llvm] r50361 - /llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Dan Gohman
gohman at apple.com
Mon Apr 28 10:42:03 PDT 2008
Author: djg
Date: Mon Apr 28 12:42:03 2008
New Revision: 50361
URL: http://llvm.org/viewvc/llvm-project?rev=50361&view=rev
Log:
Don't call size() on each iteration of the loop.
Modified:
llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
Modified: llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp?rev=50361&r1=50360&r2=50361&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp (original)
+++ llvm/trunk/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp Mon Apr 28 12:42:03 2008
@@ -158,7 +158,7 @@
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 @@
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);
More information about the llvm-commits
mailing list