[PATCH] D68107: [LoopInfo] Remove duplicates in ExitBlocks to reduce the compile time of hasDedicatedExits
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 26 16:14:24 PDT 2019
wmi updated this revision to Diff 222044.
wmi added a comment.
Address Philip's comment.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68107/new/
https://reviews.llvm.org/D68107
Files:
include/llvm/Analysis/LoopInfoImpl.h
Index: include/llvm/Analysis/LoopInfoImpl.h
===================================================================
--- include/llvm/Analysis/LoopInfoImpl.h
+++ include/llvm/Analysis/LoopInfoImpl.h
@@ -85,9 +85,9 @@
bool LoopBase<BlockT, LoopT>::hasDedicatedExits() const {
// Each predecessor of each exit block of a normal loop is contained
// within the loop.
- SmallVector<BlockT *, 4> ExitBlocks;
- getExitBlocks(ExitBlocks);
- for (BlockT *EB : ExitBlocks)
+ SmallVector<BlockT *, 4> UniqueExitBlocks;
+ getUniqueExitBlocks(UniqueExitBlocks);
+ for (BlockT *EB : UniqueExitBlocks)
for (BlockT *Predecessor : children<Inverse<BlockT *>>(EB))
if (!contains(Predecessor))
return false;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68107.222044.patch
Type: text/x-patch
Size: 719 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190926/f7a84fc4/attachment.bin>
More information about the llvm-commits
mailing list