diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/CodeGen/BranchFolding.cpp | 1 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 16 | ||||
-rw-r--r-- | lib/System/Win32/Path.inc | 5 | ||||
-rw-r--r-- | lib/Target/X86/X86ISelDAGToDAG.cpp | 2 | ||||
-rw-r--r-- | lib/Target/X86/X86RegisterInfo.h | 4 | ||||
-rw-r--r-- | lib/Transforms/Scalar/PredicateSimplifier.cpp | 6 | ||||
-rw-r--r-- | lib/Transforms/Utils/CloneFunction.cpp | 6 |
8 files changed, 25 insertions, 17 deletions
diff --git a/lib/CodeGen/BranchFolding.cpp b/lib/CodeGen/BranchFolding.cpp index 97587d5012..fea03a5f40 100644 --- a/lib/CodeGen/BranchFolding.cpp +++ b/lib/CodeGen/BranchFolding.cpp @@ -25,6 +25,7 @@ #include "llvm/Support/CommandLine.h" #include "llvm/ADT/Statistic.h" #include "llvm/ADT/STLExtras.h" +#include <algorithm> using namespace llvm; static Statistic<> NumDeadBlocks("branchfold", "Number of dead blocks removed"); diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 5f1b5826e0..03abac2450 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -383,7 +383,7 @@ namespace { bool isAlias(SDOperand Ptr1, int64_t Size1, const Value *SrcValue1, int SrcValueOffset1, SDOperand Ptr2, int64_t Size2, - const Value *SrcValue2, int SrcValueOffset1); + const Value *SrcValue2, int SrcValueOffset2); /// FindAliasInfo - Extracts the relevant alias information from the memory /// node. Returns true if the operand was a load. diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 6e69728ad3..ef9e3f5a1b 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -1657,16 +1657,16 @@ SDOperand SelectionDAG::getVecLoad(unsigned Count, MVT::ValueType EVT, return getNode(ISD::VLOAD, getVTList(MVT::Vector, MVT::Other), Ops, 5); } -SDOperand SelectionDAG::getStore(SDOperand Chain, SDOperand Value, +SDOperand SelectionDAG::getStore(SDOperand Chain, SDOperand Val, SDOperand Ptr, const Value *SV, int SVOffset, bool isVolatile) { - MVT::ValueType VT = Value.getValueType(); + MVT::ValueType VT = Val.getValueType(); // FIXME: Alignment == 1 for now. unsigned Alignment = 1; SDVTList VTs = getVTList(MVT::Other); SDOperand Undef = getNode(ISD::UNDEF, Ptr.getValueType()); - SDOperand Ops[] = { Chain, Value, Ptr, Undef }; + SDOperand Ops[] = { Chain, Val, Ptr, Undef }; FoldingSetNodeID ID; AddNodeIDNode(ID, ISD::STORE, VTs, Ops, 4); ID.AddInteger(ISD::UNINDEXED); @@ -1679,7 +1679,7 @@ SDOperand SelectionDAG::getStore(SDOperand Chain, SDOperand Value, void *IP = 0; if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) return SDOperand(E, 0); - SDNode *N = new StoreSDNode(Chain, Value, Ptr, Undef, ISD::UNINDEXED, false, + SDNode *N = new StoreSDNode(Chain, Val, Ptr, Undef, ISD::UNINDEXED, false, VT, SV, SVOffset, Alignment, isVolatile); N->setValueTypes(VTs); CSEMap.InsertNode(N, IP); @@ -1687,11 +1687,11 @@ SDOperand SelectionDAG::getStore(SDOperand Chain, SDOperand Value, return SDOperand(N, 0); } -SDOperand SelectionDAG::getTruncStore(SDOperand Chain, SDOperand Value, +SDOperand SelectionDAG::getTruncStore(SDOperand Chain, SDOperand Val, SDOperand Ptr, const Value *SV, int SVOffset, MVT::ValueType SVT, bool isVolatile) { - MVT::ValueType VT = Value.getValueType(); + MVT::ValueType VT = Val.getValueType(); bool isTrunc = VT != SVT; assert(VT > SVT && "Not a truncation?"); @@ -1702,7 +1702,7 @@ SDOperand SelectionDAG::getTruncStore(SDOperand Chain, SDOperand Value, unsigned Alignment = 1; SDVTList VTs = getVTList(MVT::Other); SDOperand Undef = getNode(ISD::UNDEF, Ptr.getValueType()); - SDOperand Ops[] = { Chain, Value, Ptr, Undef }; + SDOperand Ops[] = { Chain, Val, Ptr, Undef }; FoldingSetNodeID ID; AddNodeIDNode(ID, ISD::STORE, VTs, Ops, 4); ID.AddInteger(ISD::UNINDEXED); @@ -1715,7 +1715,7 @@ SDOperand SelectionDAG::getTruncStore(SDOperand Chain, SDOperand Value, void *IP = 0; if (SDNode *E = CSEMap.FindNodeOrInsertPos(ID, IP)) return SDOperand(E, 0); - SDNode *N = new StoreSDNode(Chain, Value, Ptr, Undef, ISD::UNINDEXED, isTrunc, + SDNode *N = new StoreSDNode(Chain, Val, Ptr, Undef, ISD::UNINDEXED, isTrunc, SVT, SV, SVOffset, Alignment, isVolatile); N->setValueTypes(VTs); CSEMap.InsertNode(N, IP); diff --git a/lib/System/Win32/Path.inc b/lib/System/Win32/Path.inc index 048bf60297..1eee2bb3c1 100644 --- a/lib/System/Win32/Path.inc +++ b/lib/System/Win32/Path.inc @@ -124,7 +124,12 @@ Path::GetTemporaryDirectory(std::string* ErrMsg) { // Append a subdirectory passed on our process id so multiple LLVMs don't // step on each other's toes. +#ifdef __MINGW32__ + // Mingw's Win32 header files are broken. sprintf(pathname, "LLVM_%u", unsigned(GetCurrentProcessId())); +#else + sprintf(pathname, "LLVM_%u", GetCurrentProcessId()); +#endif result.appendComponent(pathname); // If there's a directory left over from a previous LLVM execution that diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 343176d692..3957b941c7 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -663,7 +663,7 @@ bool X86DAGToDAGISel::MatchAddress(SDOperand N, X86ISelAddressMode &AM, AM.IndexReg = ShVal.Val->getOperand(0); ConstantSDNode *AddVal = cast<ConstantSDNode>(ShVal.Val->getOperand(1)); - uint64_t Disp = AM.Disp + AddVal->getValue() << Val; + uint64_t Disp = AM.Disp + (AddVal->getValue() << Val); if (isInt32(Disp)) AM.Disp = Disp; else diff --git a/lib/Target/X86/X86RegisterInfo.h b/lib/Target/X86/X86RegisterInfo.h index fdab3ee7a0..df43b86d2a 100644 --- a/lib/Target/X86/X86RegisterInfo.h +++ b/lib/Target/X86/X86RegisterInfo.h @@ -22,9 +22,11 @@ namespace llvm { class TargetInstrInfo; class X86TargetMachine; -struct X86RegisterInfo : public X86GenRegisterInfo { +class X86RegisterInfo : public X86GenRegisterInfo { +public: X86TargetMachine &TM; const TargetInstrInfo &TII; + private: /// Is64Bit - Is the target 64-bits. bool Is64Bit; diff --git a/lib/Transforms/Scalar/PredicateSimplifier.cpp b/lib/Transforms/Scalar/PredicateSimplifier.cpp index ca2762cac7..47f6d3d982 100644 --- a/lib/Transforms/Scalar/PredicateSimplifier.cpp +++ b/lib/Transforms/Scalar/PredicateSimplifier.cpp @@ -428,7 +428,7 @@ namespace { // "setlt/gt int %a, %b" NE false then %a NE %b if (ConstantBool *CB = dyn_cast<ConstantBool>(V1)) { - if (CB->getValue() ^ Opcode==NE) + if (CB->getValue() ^ (Opcode==NE)) addNotEqual(BO->getOperand(0), BO->getOperand(1)); } break; @@ -437,7 +437,7 @@ namespace { // "setle/ge int %a, %b" EQ false then %a NE %b // "setle/ge int %a, %b" NE true then %a NE %b if (ConstantBool *CB = dyn_cast<ConstantBool>(V1)) { - if (CB->getValue() ^ Opcode==EQ) + if (CB->getValue() ^ (Opcode==EQ)) addNotEqual(BO->getOperand(0), BO->getOperand(1)); } break; @@ -486,7 +486,7 @@ namespace { if (ConstantBool *CB = dyn_cast<ConstantBool>(V1)) { if (ConstantBool *A = dyn_cast<ConstantBool>(LHS)) { addEqual(RHS, ConstantBool::get(A->getValue() ^ CB->getValue() - ^ Opcode==NE)); + ^ (Opcode==NE))); } } else if (ConstantIntegral *CI = dyn_cast<ConstantIntegral>(V1)) { diff --git a/lib/Transforms/Utils/CloneFunction.cpp b/lib/Transforms/Utils/CloneFunction.cpp index 30a7add79b..3aa7397ef9 100644 --- a/lib/Transforms/Utils/CloneFunction.cpp +++ b/lib/Transforms/Utils/CloneFunction.cpp @@ -313,9 +313,9 @@ void llvm::CloneAndPruneFunctionInto(Function *NewFunc, const Function *OldFunc, assert(NameSuffix && "NameSuffix cannot be null!"); #ifndef NDEBUG - for (Function::const_arg_iterator I = OldFunc->arg_begin(), - E = OldFunc->arg_end(); I != E; ++I) - assert(ValueMap.count(I) && "No mapping from source argument specified!"); + for (Function::const_arg_iterator II = OldFunc->arg_begin(), + E = OldFunc->arg_end(); II != E; ++II) + assert(ValueMap.count(II) && "No mapping from source argument specified!"); #endif PruningFunctionCloner PFC(NewFunc, OldFunc, ValueMap, Returns, |