diff options
-rw-r--r-- | llvm/include/llvm/Analysis/LoopInfo.h | 2 | ||||
-rw-r--r-- | llvm/include/llvm/Analysis/LoopInfoImpl.h | 6 | ||||
-rw-r--r-- | llvm/include/llvm/Support/GenericDomTree.h | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/llvm/include/llvm/Analysis/LoopInfo.h b/llvm/include/llvm/Analysis/LoopInfo.h index 2fad1737d1c..096df1e421a 100644 --- a/llvm/include/llvm/Analysis/LoopInfo.h +++ b/llvm/include/llvm/Analysis/LoopInfo.h @@ -158,7 +158,7 @@ public: /// True if terminator in the block can branch to another block that is /// outside of the current loop. bool isLoopExiting(const BlockT *BB) const { - for (const auto Succ : children<const BlockT*>(BB)) { + for (const auto &Succ : children<const BlockT*>(BB)) { if (!contains(Succ)) return true; } diff --git a/llvm/include/llvm/Analysis/LoopInfoImpl.h b/llvm/include/llvm/Analysis/LoopInfoImpl.h index 6dc0422ce0e..66c9f68afc6 100644 --- a/llvm/include/llvm/Analysis/LoopInfoImpl.h +++ b/llvm/include/llvm/Analysis/LoopInfoImpl.h @@ -35,7 +35,7 @@ template<class BlockT, class LoopT> void LoopBase<BlockT, LoopT>:: getExitingBlocks(SmallVectorImpl<BlockT *> &ExitingBlocks) const { for (const auto BB : blocks()) - for (const auto Succ : children<BlockT*>(BB)) + for (const auto &Succ : children<BlockT*>(BB)) if (!contains(Succ)) { // Not in current loop? It must be an exit block. ExitingBlocks.push_back(BB); @@ -61,7 +61,7 @@ template<class BlockT, class LoopT> void LoopBase<BlockT, LoopT>:: getExitBlocks(SmallVectorImpl<BlockT*> &ExitBlocks) const { for (const auto BB : blocks()) - for (const auto Succ : children<BlockT*>(BB)) + for (const auto &Succ : children<BlockT*>(BB)) if (!contains(Succ)) // Not in current loop? It must be an exit block. ExitBlocks.push_back(Succ); @@ -83,7 +83,7 @@ template<class BlockT, class LoopT> void LoopBase<BlockT, LoopT>:: getExitEdges(SmallVectorImpl<Edge> &ExitEdges) const { for (const auto BB : blocks()) - for (const auto Succ : children<BlockT*>(BB)) + for (const auto &Succ : children<BlockT*>(BB)) if (!contains(Succ)) // Not in current loop? It must be an exit block. ExitEdges.emplace_back(BB, Succ); diff --git a/llvm/include/llvm/Support/GenericDomTree.h b/llvm/include/llvm/Support/GenericDomTree.h index eb7c27d2ffa..851ff7d8040 100644 --- a/llvm/include/llvm/Support/GenericDomTree.h +++ b/llvm/include/llvm/Support/GenericDomTree.h @@ -286,13 +286,13 @@ protected: NodeRef NewBBSucc = *GraphT::child_begin(NewBB); std::vector<NodeRef> PredBlocks; - for (const auto Pred : children<Inverse<N>>(NewBB)) + for (const auto &Pred : children<Inverse<N>>(NewBB)) PredBlocks.push_back(Pred); assert(!PredBlocks.empty() && "No predblocks?"); bool NewBBDominatesNewBBSucc = true; - for (const auto Pred : children<Inverse<N>>(NewBBSucc)) { + for (const auto &Pred : children<Inverse<N>>(NewBBSucc)) { if (Pred != NewBB && !dominates(NewBBSucc, Pred) && isReachableFromEntry(Pred)) { NewBBDominatesNewBBSucc = false; |