[PATCH] D73129: [LoopUnrollAndJam] Correctly update LoopInfo when unroll and jam more than 2-levels loop nests.

Kit Barton via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Mar 11 09:37:11 PDT 2020


kbarton added a comment.

In D73129#1858261 <https://reviews.llvm.org/D73129#1858261>, @Meinersbur wrote:

> In D73129#1844566 <https://reviews.llvm.org/D73129#1844566>, @Whitney wrote:
>
> > Option 1: Use LoopFusion infrastructure to jam innerloops recursively. 
> >  Option 2: Prove safety beforehand, and unroll and jamming without creating new loops.
>
>
> IMHO option 2 is preferable and more robust.


I apologize for my delay in commenting here.

I also think that Option 2 is more preferable.I agree with @Meinersbur that we shouldn't be doing UnrollAndJam if the Jam part is not possible, otherwise you just end up with another pass of unrolling, which will likely end up causing confusion. Thus, it makes more sense for UnrollAndJam to be a stand-alone pass that doesn't rely on another pass to complete.

That said, there may be parts of the analysis that is done in fusion that can be reused (or generalized and commoned out) that could be useful here. I don't know the internal of UnrollAndJam to know whether that is easy to do, or would end up with more work than benefit it provides.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73129





More information about the llvm-commits mailing list