[PATCH] D64787: [LoopInfo] Fix getUniqueNonLatchExitBlocks

Serguei Katkov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 16 00:59:14 PDT 2019


skatkov created this revision.
skatkov added reviewers: reames, fhahn, efriedma.
Herald added a project: LLVM.

It is possible that exit block has two predecessors and one of them is a latch
block while another is not.

Current algorithm is based on the assumption that all exits are dedicated
and therefore we can check only first predecessor of loop exit to find all unique
exits.

However if we do not consider latch block and it is first predecessor of some
exit then this exit will be found.

Regression test is added.

As a side effect of algorithm re-writing, the restriction that all exits are dedicated
is eliminated


https://reviews.llvm.org/D64787

Files:
  llvm/include/llvm/Analysis/LoopInfo.h
  llvm/include/llvm/Analysis/LoopInfoImpl.h
  llvm/unittests/Analysis/LoopInfoTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64787.210037.patch
Type: text/x-patch
Size: 5359 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190716/30037ce5/attachment.bin>


More information about the llvm-commits mailing list