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

Whitney Tsang via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 28 07:08:37 PST 2020


Whitney added a comment.

Option 1: Use LoopFusion infrastructure to jam innerloops recursively.

- we need this patch to update LI correctly.
- modify LoopFusion to make its functionality utilities for other passes.
- we may only know the innerloops cannot be fuse after unroll and jam the parent loops.

FYI, @kbarton opinion?

Option 2: Prove safety beforehand, and unroll and jamming without creating new loops.

- we no longer need this patch
- modify safety checks
- modify codegen
- not doing unroll and jam as long as one subloop pair is not safe to fuse.
- should be faster to compile

Depending on whether we want to unroll and jam loop-i if loop-k is not safe to fuse, we will prefer option 1 or 2.

  for i
    A(i)
    for j
      B(i, j)
      for k
        C(i, j, k)
      D(i, j)
    E(i)


I will continue updating this patch, when we have an idea of which option to take.


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