From 5b2103405b55c8b9960d28f59df27040db39813f Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Wed, 15 Dec 2004 07:04:32 +0000 Subject: Move virtual method call out of loop git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@18955 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/CodeGen/RegAllocLinearScan.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/CodeGen/RegAllocLinearScan.cpp') diff --git a/lib/CodeGen/RegAllocLinearScan.cpp b/lib/CodeGen/RegAllocLinearScan.cpp index 140846fe01..2b389117e7 100644 --- a/lib/CodeGen/RegAllocLinearScan.cpp +++ b/lib/CodeGen/RegAllocLinearScan.cpp @@ -426,8 +426,8 @@ void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur) float minWeight = HUGE_VAL; unsigned minReg = 0; const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(cur->reg); - for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_); - i != rc->allocation_order_end(*mf_); ++i) { + for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_), + e = rc->allocation_order_end(*mf_); i != e; ++i) { unsigned reg = *i; if (minWeight > SpillWeights[reg]) { minWeight = SpillWeights[reg]; -- cgit v1.2.3-70-g09d2