[PATCH] D64309: [LoopInfo] Update getExitEdges to accept vector of pairs for non const BasicBlock

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 8 21:22:07 PDT 2019


This revision was automatically updated to reflect the committed changes.
Closed by commit rL365437: [LoopInfo] Update getExitEdges to accept vector of pairs for non const… (authored by skatkov, committed by ).

Changed prior to commit:
  https://reviews.llvm.org/D64309?vs=208319&id=208590#toc

Repository:
  rL LLVM

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D64309/new/

https://reviews.llvm.org/D64309

Files:
  llvm/trunk/include/llvm/Analysis/LoopInfo.h
  llvm/trunk/lib/Transforms/Scalar/LoopPredication.cpp


Index: llvm/trunk/include/llvm/Analysis/LoopInfo.h
===================================================================
--- llvm/trunk/include/llvm/Analysis/LoopInfo.h
+++ llvm/trunk/include/llvm/Analysis/LoopInfo.h
@@ -279,7 +279,7 @@
   BlockT *getUniqueExitBlock() const;
 
   /// Edge type.
-  typedef std::pair<const BlockT *, const BlockT *> Edge;
+  typedef std::pair<BlockT *, BlockT *> Edge;
 
   /// Return all pairs of (_inside_block_,_outside_block_).
   void getExitEdges(SmallVectorImpl<Edge> &ExitEdges) const;
Index: llvm/trunk/lib/Transforms/Scalar/LoopPredication.cpp
===================================================================
--- llvm/trunk/lib/Transforms/Scalar/LoopPredication.cpp
+++ llvm/trunk/lib/Transforms/Scalar/LoopPredication.cpp
@@ -903,7 +903,7 @@
   if (SkipProfitabilityChecks || !BPI)
     return true;
 
-  SmallVector<std::pair<const BasicBlock *, const BasicBlock *>, 8> ExitEdges;
+  SmallVector<std::pair<BasicBlock *, BasicBlock *>, 8> ExitEdges;
   L->getExitEdges(ExitEdges);
   // If there is only one exiting edge in the loop, it is always profitable to
   // predicate the loop.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64309.208590.patch
Type: text/x-patch
Size: 1132 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190709/6ef0379e/attachment.bin>


More information about the llvm-commits mailing list