diff options
Diffstat (limited to 'include/llvm/Analysis')
-rw-r--r-- | include/llvm/Analysis/AliasSetTracker.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/CallGraph.h | 2 | ||||
-rw-r--r-- | include/llvm/Analysis/DominatorInternals.h | 3 | ||||
-rw-r--r-- | include/llvm/Analysis/Dominators.h | 4 | ||||
-rw-r--r-- | include/llvm/Analysis/LoopInfo.h | 5 | ||||
-rw-r--r-- | include/llvm/Analysis/ScalarEvolutionExpressions.h | 6 |
6 files changed, 12 insertions, 10 deletions
diff --git a/include/llvm/Analysis/AliasSetTracker.h b/include/llvm/Analysis/AliasSetTracker.h index a4367c4373..70c25b0680 100644 --- a/include/llvm/Analysis/AliasSetTracker.h +++ b/include/llvm/Analysis/AliasSetTracker.h @@ -232,7 +232,7 @@ private: bool KnownMustAlias = false); void addCallSite(CallSite CS, AliasAnalysis &AA); void removeCallSite(CallSite CS) { - for (unsigned i = 0, e = CallSites.size(); i != e; ++i) + for (size_t i = 0, e = CallSites.size(); i != e; ++i) if (CallSites[i].getInstruction() == CS.getInstruction()) { CallSites[i] = CallSites.back(); CallSites.pop_back(); diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index 2bb06900ab..88449ab258 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -191,7 +191,7 @@ public: inline const_iterator begin() const { return CalledFunctions.begin(); } inline const_iterator end() const { return CalledFunctions.end(); } inline bool empty() const { return CalledFunctions.empty(); } - inline unsigned size() const { return CalledFunctions.size(); } + inline unsigned size() const { return (unsigned)CalledFunctions.size(); } // Subscripting operator - Return the i'th called function... // diff --git a/include/llvm/Analysis/DominatorInternals.h b/include/llvm/Analysis/DominatorInternals.h index 063602e92f..1564774ada 100644 --- a/include/llvm/Analysis/DominatorInternals.h +++ b/include/llvm/Analysis/DominatorInternals.h @@ -248,7 +248,8 @@ void Calculate(DominatorTreeBase<typename GraphTraits<NodeT>::NodeType>& DT, // Step #1: Number blocks in depth-first order and initialize variables used // in later stages of the algorithm. - for (unsigned i = 0, e = DT.Roots.size(); i != e; ++i) + for (unsigned i = 0, e = static_cast<unsigned>(DT.Roots.size()); + i != e; ++i) N = DFSPass<GraphT>(DT, DT.Roots[i], N); // it might be that some blocks did not get a DFS number (e.g., blocks of diff --git a/include/llvm/Analysis/Dominators.h b/include/llvm/Analysis/Dominators.h index ad1766c85a..6ce3260b8f 100644 --- a/include/llvm/Analysis/Dominators.h +++ b/include/llvm/Analysis/Dominators.h @@ -237,7 +237,7 @@ protected: bool NewBBDominatesNewBBSucc = true; { typename GraphT::NodeType* OnePred = PredBlocks[0]; - unsigned i = 1, e = PredBlocks.size(); + size_t i = 1, e = PredBlocks.size(); for (i = 1; !DT.isReachableFromEntry(OnePred); ++i) { assert(i != e && "Didn't find reachable pred?"); OnePred = PredBlocks[i]; @@ -567,7 +567,7 @@ protected: SmallVector<std::pair<DomTreeNodeBase<NodeT>*, typename DomTreeNodeBase<NodeT>::iterator>, 32> WorkStack; - for (unsigned i = 0, e = this->Roots.size(); i != e; ++i) { + for (unsigned i = 0, e = (unsigned)this->Roots.size(); i != e; ++i) { DomTreeNodeBase<NodeT> *ThisRoot = getNode(this->Roots[i]); WorkStack.push_back(std::make_pair(ThisRoot, ThisRoot->begin())); ThisRoot->DFSNumIn = DFSNum++; diff --git a/include/llvm/Analysis/LoopInfo.h b/include/llvm/Analysis/LoopInfo.h index fdb722c225..0243a00df5 100644 --- a/include/llvm/Analysis/LoopInfo.h +++ b/include/llvm/Analysis/LoopInfo.h @@ -80,7 +80,7 @@ public: /// Loop ctor - This creates an empty loop. LoopBase() : ParentLoop(0) {} ~LoopBase() { - for (unsigned i = 0, e = SubLoops.size(); i != e; ++i) + for (size_t i = 0, e = SubLoops.size(); i != e; ++i) delete SubLoops[i]; } @@ -847,7 +847,8 @@ public: "This loop should not be inserted here!"); // Check to see if it belongs in a child loop... - for (unsigned i = 0, e = Parent->SubLoops.size(); i != e; ++i) + for (unsigned i = 0, e = static_cast<unsigned>(Parent->SubLoops.size()); + i != e; ++i) if (Parent->SubLoops[i]->contains(LHeader)) { InsertLoopInto(L, Parent->SubLoops[i]); return; diff --git a/include/llvm/Analysis/ScalarEvolutionExpressions.h b/include/llvm/Analysis/ScalarEvolutionExpressions.h index 39b083d5fa..e077cfe2a0 100644 --- a/include/llvm/Analysis/ScalarEvolutionExpressions.h +++ b/include/llvm/Analysis/ScalarEvolutionExpressions.h @@ -229,7 +229,7 @@ namespace llvm { ~SCEVCommutativeExpr(); public: - unsigned getNumOperands() const { return Operands.size(); } + unsigned getNumOperands() const { return (unsigned)Operands.size(); } const SCEVHandle &getOperand(unsigned i) const { assert(i < Operands.size() && "Operand index out of range!"); return Operands[i]; @@ -387,7 +387,7 @@ namespace llvm { SCEVAddRecExpr(const std::vector<SCEVHandle> &ops, const Loop *l) : SCEV(scAddRecExpr), Operands(ops), L(l) { - for (unsigned i = 0, e = Operands.size(); i != e; ++i) + for (size_t i = 0, e = Operands.size(); i != e; ++i) assert(Operands[i]->isLoopInvariant(l) && "Operands of AddRec must be loop-invariant!"); } @@ -397,7 +397,7 @@ namespace llvm { op_iterator op_begin() const { return Operands.begin(); } op_iterator op_end() const { return Operands.end(); } - unsigned getNumOperands() const { return Operands.size(); } + unsigned getNumOperands() const { return (unsigned)Operands.size(); } const SCEVHandle &getOperand(unsigned i) const { return Operands[i]; } const SCEVHandle &getStart() const { return Operands[0]; } const Loop *getLoop() const { return L; } |