? diff.txt ? tablegen_includes ? win32 ? include/llvm/ADT/hash_map ? include/llvm/ADT/hash_set ? include/llvm/ADT/iterator ? include/llvm/Config/config.h ? include/llvm/Support/DataTypes.h ? lib/System/platform ? utils/TableGen/FileLexer.cpp ? utils/TableGen/FileParser.cpp ? utils/TableGen/FileParser.h ? utils/TableGen/FileParser.hpp Index: include/llvm/CodeGen/MachineBasicBlock.h =================================================================== RCS file: /var/cvs/llvm/llvm/include/llvm/CodeGen/MachineBasicBlock.h,v retrieving revision 1.39 diff -u -r1.39 MachineBasicBlock.h --- include/llvm/CodeGen/MachineBasicBlock.h 1 Sep 2004 22:55:34 -0000 1.39 +++ include/llvm/CodeGen/MachineBasicBlock.h 25 Oct 2004 08:29:24 -0000 @@ -18,6 +18,8 @@ #include "llvm/ADT/GraphTraits.h" #include "llvm/ADT/ilist" #include +#include +#include namespace llvm { class MachineFunction; Index: include/llvm/Config/alloca.h =================================================================== RCS file: /var/cvs/llvm/llvm/include/llvm/Config/alloca.h,v retrieving revision 1.6 diff -u -r1.6 alloca.h --- include/llvm/Config/alloca.h 22 Sep 2004 15:28:32 -0000 1.6 +++ include/llvm/Config/alloca.h 25 Oct 2004 08:29:24 -0000 @@ -24,7 +24,8 @@ * (notably FreeBSD) defined alloca() there. */ #ifdef _MSC_VER -/* noop on Visual C++ */ +#include +#define alloca _alloca #elif defined(HAVE_ALLOCA_H) #include #elif defined(__MINGW_H) && defined(HAVE_MALLOC_H) Index: include/llvm/Support/DataTypes.h.in =================================================================== RCS file: /var/cvs/llvm/llvm/include/llvm/Support/DataTypes.h.in,v retrieving revision 1.13 diff -u -r1.13 DataTypes.h.in --- include/llvm/Support/DataTypes.h.in 18 Oct 2004 22:14:48 -0000 1.13 +++ include/llvm/Support/DataTypes.h.in 25 Oct 2004 08:29:24 -0000 @@ -84,6 +84,9 @@ #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: lib/Analysis/ScalarEvolution.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Analysis/ScalarEvolution.cpp,v retrieving revision 1.27 diff -u -r1.27 ScalarEvolution.cpp --- lib/Analysis/ScalarEvolution.cpp 12 Oct 2004 01:49:27 -0000 1.27 +++ lib/Analysis/ScalarEvolution.cpp 25 Oct 2004 08:29:26 -0000 @@ -1984,7 +1984,7 @@ cast(ConstantExpr::getCast(SqrtTerm, SqrtTerm->getType()->getUnsignedVersion())); uint64_t SqrtValV = SqrtVal->getValue(); - uint64_t SqrtValV2 = (uint64_t)sqrt(SqrtValV); + uint64_t SqrtValV2 = (uint64_t)sqrt((double)SqrtValV); // The square root might not be precise for arbitrary 64-bit integer // values. Do some sanity checks to ensure it's correct. if (SqrtValV2*SqrtValV2 > SqrtValV || Index: lib/CodeGen/LiveIntervalAnalysis.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp,v retrieving revision 1.130 diff -u -r1.130 LiveIntervalAnalysis.cpp --- lib/CodeGen/LiveIntervalAnalysis.cpp 1 Oct 2004 23:15:35 -0000 1.130 +++ lib/CodeGen/LiveIntervalAnalysis.cpp 25 Oct 2004 08:29:27 -0000 @@ -156,7 +156,7 @@ LiveInterval &RegInt = getInterval(reg); RegInt.weight += - (mop.isUse() + mop.isDef()) * pow(10.0F, loopDepth); + (mop.isUse() + mop.isDef()) * pow(10.0F, (int)loopDepth); } } ++mii; Index: lib/CodeGen/LiveVariables.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/CodeGen/LiveVariables.cpp,v retrieving revision 1.44 diff -u -r1.44 LiveVariables.cpp --- lib/CodeGen/LiveVariables.cpp 1 Sep 2004 22:55:35 -0000 1.44 +++ lib/CodeGen/LiveVariables.cpp 25 Oct 2004 08:29:27 -0000 @@ -33,6 +33,7 @@ #include "llvm/Target/TargetMachine.h" #include "llvm/ADT/DepthFirstIterator.h" #include "llvm/ADT/STLExtras.h" +#include "llvm/Config/alloca.h" using namespace llvm; static RegisterAnalysis X("livevars", "Live Variable Analysis"); @@ -155,8 +156,8 @@ // physical register. This is a purely local property, because all physical // register references as presumed dead across basic blocks. // - MachineInstr *PhysRegInfoA[RegInfo->getNumRegs()]; - bool PhysRegUsedA[RegInfo->getNumRegs()]; + MachineInstr **PhysRegInfoA = (MachineInstr **)alloca(sizeof(MachineInstr *) * RegInfo->getNumRegs()); + bool *PhysRegUsedA = (bool *)alloca(sizeof(bool) * RegInfo->getNumRegs()); std::fill(PhysRegInfoA, PhysRegInfoA+RegInfo->getNumRegs(), (MachineInstr*)0); PhysRegInfo = PhysRegInfoA; PhysRegUsed = PhysRegUsedA; Index: lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp,v retrieving revision 1.78 diff -u -r1.78 ExternalFunctions.cpp --- lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp 1 Sep 2004 22:55:35 -0000 1.78 +++ lib/ExecutionEngine/Interpreter/ExternalFunctions.cpp 25 Oct 2004 08:29:28 -0000 @@ -213,6 +213,8 @@ return GV; } +#ifdef HAVE_RAND48 + // double drand48() GenericValue lle_X_drand48(FunctionType *M, const vector &Args) { assert(Args.size() == 0); @@ -236,6 +238,16 @@ return GenericValue(); } +#endif + +// int rand() +GenericValue lle_X_rand(FunctionType *M, const vector &Args) { + assert(Args.size() == 0); + GenericValue GV; + GV.IntVal = rand(); + return GV; +} + // void srand(uint) GenericValue lle_X_srand(FunctionType *M, const vector &Args) { assert(Args.size() == 1); @@ -676,9 +688,12 @@ FuncNames["lle_X_log"] = lle_X_log; FuncNames["lle_X_floor"] = lle_X_floor; FuncNames["lle_X_srand"] = lle_X_srand; + FuncNames["lle_X_rand"] = lle_X_rand; +#ifdef HAVE_RAND48 FuncNames["lle_X_drand48"] = lle_X_drand48; FuncNames["lle_X_srand48"] = lle_X_srand48; FuncNames["lle_X_lrand48"] = lle_X_lrand48; +#endif FuncNames["lle_X_sqrt"] = lle_X_sqrt; FuncNames["lle_X_puts"] = lle_X_puts; FuncNames["lle_X_printf"] = lle_X_printf; Index: lib/Support/IsInf.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Support/IsInf.cpp,v retrieving revision 1.3 diff -u -r1.3 IsInf.cpp --- lib/Support/IsInf.cpp 1 Sep 2004 22:55:35 -0000 1.3 +++ lib/Support/IsInf.cpp 25 Oct 2004 08:29:28 -0000 @@ -24,6 +24,9 @@ // apparently this has been a problem with Solaris for years. # include static int isinf(double x) { return !finite(x) && x==x; } +#elif defined(_MSC_VER) +#include +#define isinf !_finite #else # error "Don't know how to get isinf()" #endif Index: lib/Support/IsNAN.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Support/IsNAN.cpp,v retrieving revision 1.2 diff -u -r1.2 IsNAN.cpp --- lib/Support/IsNAN.cpp 1 Sep 2004 22:55:35 -0000 1.2 +++ lib/Support/IsNAN.cpp 25 Oct 2004 08:29:28 -0000 @@ -19,6 +19,9 @@ #elif HAVE_STD_ISNAN_IN_CMATH # include using std::isnan; +#elif defined(_MSC_VER) +#include +#define isnan _isnan #else # error "Don't know how to get isnan()" #endif Index: lib/Transforms/Scalar/PRE.cpp =================================================================== RCS file: /var/cvs/llvm/llvm/lib/Transforms/Scalar/PRE.cpp,v retrieving revision 1.11 diff -u -r1.11 PRE.cpp --- lib/Transforms/Scalar/PRE.cpp 1 Sep 2004 22:55:36 -0000 1.11 +++ lib/Transforms/Scalar/PRE.cpp 25 Oct 2004 08:29:29 -0000 @@ -34,6 +34,7 @@ #include "llvm/ADT/PostOrderIterator.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/hash_set" +#include "llvm/ADT/hash_map" using namespace llvm; namespace {