diff options
Diffstat (limited to 'llvm/include')
-rw-r--r-- | llvm/include/llvm/ADT/BitVector.h | 3 | ||||
-rw-r--r-- | llvm/include/llvm/ADT/DenseMap.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/ADT/ilist | 1 | ||||
-rw-r--r-- | llvm/include/llvm/Analysis/LoopInfo.h | 3 | ||||
-rw-r--r-- | llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h | 3 | ||||
-rw-r--r-- | llvm/include/llvm/CodeGen/MachineRegisterInfo.h | 8 | ||||
-rw-r--r-- | llvm/include/llvm/CodeGen/SelectionDAGNodes.h | 4 | ||||
-rw-r--r-- | llvm/include/llvm/Target/SubtargetFeature.h | 1 | ||||
-rw-r--r-- | llvm/include/llvm/Target/TargetJITInfo.h | 3 |
9 files changed, 17 insertions, 11 deletions
diff --git a/llvm/include/llvm/ADT/BitVector.h b/llvm/include/llvm/ADT/BitVector.h index 3ff2441637c..a3a89201864 100644 --- a/llvm/include/llvm/ADT/BitVector.h +++ b/llvm/include/llvm/ADT/BitVector.h @@ -16,8 +16,9 @@ #include "llvm/Support/MathExtras.h" #include <algorithm> -#include <cstdlib> #include <cassert> +#include <cstdlib> +#include <cstring> namespace llvm { diff --git a/llvm/include/llvm/ADT/DenseMap.h b/llvm/include/llvm/ADT/DenseMap.h index fdfb3294ea3..b29c6915627 100644 --- a/llvm/include/llvm/ADT/DenseMap.h +++ b/llvm/include/llvm/ADT/DenseMap.h @@ -313,7 +313,7 @@ private: NumEntries = 0; NumTombstones = 0; NumBuckets = InitBuckets; - assert(InitBuckets && (InitBuckets & InitBuckets-1) == 0 && + assert(InitBuckets && (InitBuckets & (InitBuckets-1)) == 0 && "# initial buckets must be a power of two!"); Buckets = reinterpret_cast<BucketT*>(new char[sizeof(BucketT)*InitBuckets]); // Initialize all the keys to EmptyKey. diff --git a/llvm/include/llvm/ADT/ilist b/llvm/include/llvm/ADT/ilist index d58db80a0ad..fe55f5ced9c 100644 --- a/llvm/include/llvm/ADT/ilist +++ b/llvm/include/llvm/ADT/ilist @@ -40,6 +40,7 @@ #include "llvm/ADT/iterator" #include <cassert> +#include <cstdlib> namespace llvm { diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h index 4cb03fbd8e7..789b9048578 100644 --- a/llvm/include/llvm/Analysis/LoopInfo.h +++ b/llvm/include/llvm/Analysis/LoopInfo.h @@ -404,13 +404,14 @@ public: if (BranchInst *BI = dyn_cast<BranchInst>(BackedgeBlock->getTerminator())) if (BI->isConditional()) { if (ICmpInst *ICI = dyn_cast<ICmpInst>(BI->getCondition())) { - if (ICI->getOperand(0) == Inc) + if (ICI->getOperand(0) == Inc) { if (BI->getSuccessor(0) == getHeader()) { if (ICI->getPredicate() == ICmpInst::ICMP_NE) return ICI->getOperand(1); } else if (ICI->getPredicate() == ICmpInst::ICMP_EQ) { return ICI->getOperand(1); } + } } } diff --git a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h b/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h index 905493a4af8..39b083d5fac 100644 --- a/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ b/llvm/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -253,11 +253,12 @@ namespace llvm { virtual bool hasComputableLoopEvolution(const Loop *L) const { bool HasVarying = false; for (unsigned i = 0, e = getNumOperands(); i != e; ++i) - if (!getOperand(i)->isLoopInvariant(L)) + if (!getOperand(i)->isLoopInvariant(L)) { if (getOperand(i)->hasComputableLoopEvolution(L)) HasVarying = true; else return false; + } return HasVarying; } diff --git a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h b/llvm/include/llvm/CodeGen/MachineRegisterInfo.h index 453fe2c8343..48e8e55b296 100644 --- a/llvm/include/llvm/CodeGen/MachineRegisterInfo.h +++ b/llvm/include/llvm/CodeGen/MachineRegisterInfo.h @@ -211,8 +211,8 @@ public: // If the first node isn't one we're interested in, advance to one that // we are interested in. if (op) { - if (!ReturnUses && op->isUse() || - !ReturnDefs && op->isDef()) + if ((!ReturnUses && op->isUse()) || + (!ReturnDefs && op->isDef())) ++*this; } } @@ -240,8 +240,8 @@ public: Op = Op->getNextOperandForReg(); // If this is an operand we don't care about, skip it. - while (Op && (!ReturnUses && Op->isUse() || - !ReturnDefs && Op->isDef())) + while (Op && ((!ReturnUses && Op->isUse()) || + (!ReturnDefs && Op->isDef()))) Op = Op->getNextOperandForReg(); return *this; diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h index d6a492d0c19..c1a50bb7dc7 100644 --- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h @@ -843,8 +843,8 @@ template<> struct DenseMapInfo<SDOperand> { static inline SDOperand getEmptyKey() { return SDOperand((SDNode*)-1, -1U); } static inline SDOperand getTombstoneKey() { return SDOperand((SDNode*)-1, 0);} static unsigned getHashValue(const SDOperand &Val) { - return (unsigned)((uintptr_t)Val.Val >> 4) ^ - (unsigned)((uintptr_t)Val.Val >> 9) + Val.ResNo; + return ((unsigned)((uintptr_t)Val.Val >> 4) ^ + (unsigned)((uintptr_t)Val.Val >> 9)) + Val.ResNo; } static bool isEqual(const SDOperand &LHS, const SDOperand &RHS) { return LHS == RHS; diff --git a/llvm/include/llvm/Target/SubtargetFeature.h b/llvm/include/llvm/Target/SubtargetFeature.h index 98a589213a2..d187daac0c8 100644 --- a/llvm/include/llvm/Target/SubtargetFeature.h +++ b/llvm/include/llvm/Target/SubtargetFeature.h @@ -21,6 +21,7 @@ #include <string> #include <vector> #include <iosfwd> +#include <cstring> #include "llvm/Support/DataTypes.h" namespace llvm { diff --git a/llvm/include/llvm/Target/TargetJITInfo.h b/llvm/include/llvm/Target/TargetJITInfo.h index 1ad927b9b04..98d17c409e5 100644 --- a/llvm/include/llvm/Target/TargetJITInfo.h +++ b/llvm/include/llvm/Target/TargetJITInfo.h @@ -17,8 +17,9 @@ #ifndef LLVM_TARGET_TARGETJITINFO_H #define LLVM_TARGET_TARGETJITINFO_H -#include <cassert> #include <vector> +#include <cassert> +#include "llvm/Support/DataTypes.h" namespace llvm { class Function; |