Patch to support MSVC better, contributed by Morten Ofstad
authorChris Lattner <sabre@nondot.org>
Mon, 25 Oct 2004 18:40:47 +0000 (18:40 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 25 Oct 2004 18:40:47 +0000 (18:40 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17215 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/DataTypes.h.in
lib/CodeGen/LiveIntervalAnalysis.cpp

index 2ac1e1721e52de6e8b32e37ff9b5deb03f1f0a95..f5467b2220f849bbe4e0601920c5328a7cd1a396 100644 (file)
@@ -84,6 +84,9 @@ typedef signed   int ssize_t;
 #if !defined(INT64_MAX)
 # define INT64_MAX 9223372036854775807LL
 #endif
+#if !defined(INT64_MIN)
+# define INT64_MIN ((-INT64_MAX)-1)
+#endif
 #if !defined(UINT64_MAX)
 # define UINT64_MAX 0xffffffffffffffffULL
 #endif
index 6916e9669497f546aba7c151d53fc7052e66c025..c3a15fcc198a046880958fa05bb373288ced4dfc 100644 (file)
@@ -156,7 +156,7 @@ bool LiveIntervals::runOnMachineFunction(MachineFunction &fn) {
 
             LiveInterval &RegInt = getInterval(reg);
             RegInt.weight +=
-              (mop.isUse() + mop.isDef()) * pow(10.0F, loopDepth);
+              (mop.isUse() + mop.isDef()) * pow(10.0F, (int)loopDepth);
           }
         }
         ++mii;