[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp MachineFunction.cpp

Chris Lattner lattner at cs.uiuc.edu
Sat Jan 8 11:55:14 PST 2005



Changes in directory llvm/lib/CodeGen:

LiveIntervalAnalysis.cpp updated: 1.133 -> 1.134
MachineFunction.cpp updated: 1.73 -> 1.74
---
Log message:

Silence warnings from VS


---
Diffs of the changes:  (+5 -3)

Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.133 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.134
--- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.133	Mon Dec  6 22:03:45 2004
+++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp	Sat Jan  8 13:54:59 2005
@@ -261,7 +261,7 @@
 
             // the spill weight is now infinity as it
             // cannot be spilled again
-            nI.weight = HUGE_VAL;
+            nI.weight = float(HUGE_VAL);
             LiveRange LR(start, end, nI.getNextValue());
             DEBUG(std::cerr << " +" << LR);
             nI.addRange(LR);
@@ -694,6 +694,7 @@
 }
 
 LiveInterval LiveIntervals::createInterval(unsigned reg) {
-  float Weight = MRegisterInfo::isPhysicalRegister(reg) ?  HUGE_VAL :0.0F;
+  float Weight = MRegisterInfo::isPhysicalRegister(reg) ? 
+                       (float)HUGE_VAL :0.0F;
   return LiveInterval(reg, Weight);
 }


Index: llvm/lib/CodeGen/MachineFunction.cpp
diff -u llvm/lib/CodeGen/MachineFunction.cpp:1.73 llvm/lib/CodeGen/MachineFunction.cpp:1.74
--- llvm/lib/CodeGen/MachineFunction.cpp:1.73	Sun Sep  5 13:41:35 2004
+++ llvm/lib/CodeGen/MachineFunction.cpp	Sat Jan  8 13:55:00 2005
@@ -256,7 +256,8 @@
 /// CreateStackObject - Create a stack object for a value of the specified type.
 ///
 int MachineFrameInfo::CreateStackObject(const Type *Ty, const TargetData &TD) {
-  return CreateStackObject(TD.getTypeSize(Ty), TD.getTypeAlignment(Ty));
+  return CreateStackObject((unsigned)TD.getTypeSize(Ty), 
+                           TD.getTypeAlignment(Ty));
 }
 
 






More information about the llvm-commits mailing list