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

Bardia Mahjour via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 5 13:48:57 PST 2020


bmahjour 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.


Another way to look at unroll-and-jam is a thin pass that invokes loop unroll + loop fusion under the hood. If we structure it that way, we maximize software reuse and any improvements to the loop fusion required to do unroll-and-jam (such as dealing with intervening code) would directly benefit use-cases that are not unroll-and-jam-specific, without duplication of effort. Similarly safety checks and cost modeling can be reused between the two transforms. I realize that may involve more work and take longer to make it functionally equivalent to what is currently available, but seems like the ideal long-term solution.


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