[llvm-commits] CVS: llvm/lib/CodeGen/RegAllocLinearScan.cpp LiveIntervals.cpp

Alkis Evlogimenos alkis at cs.uiuc.edu
Fri Feb 13 18:45:02 PST 2004


Changes in directory llvm/lib/CodeGen:

RegAllocLinearScan.cpp updated: 1.46 -> 1.47
LiveIntervals.cpp updated: 1.49 -> 1.50

---
Log message:

Use std::numeric_limits<float>::infinity() instead of
std::numeric_limits<float>::max() for weighting preallocated
intervals.


---
Diffs of the changes:  (+2 -2)

Index: llvm/lib/CodeGen/RegAllocLinearScan.cpp
diff -u llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.46 llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.47
--- llvm/lib/CodeGen/RegAllocLinearScan.cpp:1.46	Fri Feb 13 15:01:20 2004
+++ llvm/lib/CodeGen/RegAllocLinearScan.cpp	Fri Feb 13 18:44:07 2004
@@ -641,7 +641,7 @@
 
     DEBUG(std::cerr << "\t\tassigning stack slot at interval "<< *cur << ":\n");
 
-    float minWeight = std::numeric_limits<float>::max();
+    float minWeight = std::numeric_limits<float>::infinity();
     unsigned minReg = 0;
     const TargetRegisterClass* rc = mf_->getSSARegMap()->getRegClass(cur->reg);
     for (TargetRegisterClass::iterator i = rc->allocation_order_begin(*mf_);


Index: llvm/lib/CodeGen/LiveIntervals.cpp
diff -u llvm/lib/CodeGen/LiveIntervals.cpp:1.49 llvm/lib/CodeGen/LiveIntervals.cpp:1.50
--- llvm/lib/CodeGen/LiveIntervals.cpp:1.49	Fri Feb 13 15:01:20 2004
+++ llvm/lib/CodeGen/LiveIntervals.cpp	Fri Feb 13 18:44:07 2004
@@ -436,7 +436,7 @@
 LiveIntervals::Interval::Interval(unsigned r)
     : reg(r),
       weight((MRegisterInfo::isPhysicalRegister(r) ?
-              std::numeric_limits<float>::max() : 0.0F))
+              std::numeric_limits<float>::infinity() : 0.0F))
 {
 
 }





More information about the llvm-commits mailing list