[PATCH] D21312: [Polly] Fix assertion due to loop overlap with nonaffine region.

Huihui Zhang via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 21 09:36:26 PDT 2016


huihuiz added a comment.

Thanks for the review and comments!

For cases where loop overlap with nonaffine subregion, typically happens in the presence of infinite loop. That neither the surrounding loop contains the nonaffine subregion, nor the nonaffine subregion contains the surrounding loop. That said, the surrounding loop does not entirely contain the nonaffine subregion.

When presence with infinite loop, using entry and existing bb of nonaffine subregion to check if surrounding loop contains this region is not sufficient. 
In this case, for nonaffine subregion, the entry (for.body) and existing block (for.body) are contained in the surrounding loop (%for.cond<header><exiting>,%for.body<exiting>,%if.else,%if.end,%for.inc<latch>). However, there exist other basic blocks not contained in the surrounding loop. We use the set of nonaffine loops of this nonaffine subregion for checking, to save compile time overhead.

This patch handles cases with dead-end loops, assuming cases of UnreachableInst caught by isErrorBlock().

I have updated this patch with fix for the test case, please help commit and merge this patch, thanks!


Repository:
  rL LLVM

http://reviews.llvm.org/D21312





More information about the llvm-commits mailing list