[PATCH] D114917: [LoopInterchange] Enable loop interchange with multiple inner loop indvars

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 6 22:12:59 PST 2021


congzhe added a comment.

@bmahjour

Thanks for the review! While I am almost ready to post the next version that has attempted to address your comments, I found another piece of code that can be improved in interchange. It might be easier that I post that improvement patch first and rebase this patch.

To be specific, the current limtation that `there should be no instruction between induction variable increment and branch` can be entirely removed. The limitation was there initially because we split the inner latch at the point of `induction variable increment` hence all instructions after `induction variable increment` will be moved to the block that is split. However, later the pass is improved such that we only split at the inner latch branch instruction and we properly move instructions to the new block as needed.

I'll do more testing and if it looks fine, I'll post a patch that removes that limitation. Removal of that limitation can also simplify this patch.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D114917



More information about the llvm-commits mailing list