Revamp supported ops. Instead of just being supported or not, we now keep
[oota-llvm.git] / lib / CodeGen / RegAllocLinearScan.cpp
index 140846fe01e3b63f1b1889c44ae08829be04e4ce..0878e466d23473a7faf882212bc5d734dd9379ec 100644 (file)
@@ -423,11 +423,11 @@ void RA::assignRegOrStackSlotAtInterval(LiveInterval* cur)
 
   DEBUG(std::cerr << "\tassigning stack slot at interval "<< *cur << ":\n");
 
-  float minWeight = HUGE_VAL;
+  float minWeight = float(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];