[PATCH] D74382: [CloneFunction] Update loop headers after cloning all blocks in loop.

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 21 09:37:42 PST 2020


Whitney added a comment.

In D74382#1886689 <https://reviews.llvm.org/D74382#1886689>, @Meinersbur wrote:

> In D74382#1885245 <https://reviews.llvm.org/D74382#1885245>, @Whitney wrote:
>
> > @Meinersbur I have updated the example in the summary with complete LLVMIR, please let me know if that's sufficient. Thanks!
>
>
> What I meant is to update this patch to include the example that triggers this assertion as a regression test so running `ninja check-llvm` confirms that the assertion is not triggered anymore.


The assertion only get triggered if the blocks returned from `getBlocks()` of loop `header.i` is in the order of: header.i, latch.k, header.k, header.j, latch.j, latch.i, when cloneLoopWithPreheader is called with loop `header.i`.
The only way I see of changing the block order is using `reverseBlock(unsigned from)`. Do you know of other ways I can modify the order of the blocks stored in a loop?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74382





More information about the llvm-commits mailing list