summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-12-15 07:04:32 +0000
committerChris Lattner <sabre@nondot.org>2004-12-15 07:04:32 +0000
commite09dbe2732a458430a54c72f913c9d484f45c61e (patch)
treea4ddd5921a9e64af4d73459f386edf195aafea2b /llvm/lib/CodeGen/RegAllocLinearScan.cpp
parent92e02d40cbc57fd86a8400792c758b1b516c3f42 (diff)
downloadbcm5719-llvm-e09dbe2732a458430a54c72f913c9d484f45c61e.tar.gz
bcm5719-llvm-e09dbe2732a458430a54c72f913c9d484f45c61e.zip
Move virtual method call out of loop
llvm-svn: 18955
Diffstat (limited to 'llvm/lib/CodeGen/RegAllocLinearScan.cpp')
-rw-r--r--llvm/lib/CodeGen/RegAllocLinearScan.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/RegAllocLinearScan.cpp b/llvm/lib/CodeGen/RegAllocLinearScan.cpp
index 140846fe01e..2b389117e7e 100644
--- a/llvm/lib/CodeGen/RegAllocLinearScan.cpp
+++ b/llvm/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];
OpenPOWER on IntegriCloud