[PATCH] D114916: [LoopInterchange] Enable loop interchange with multiple outer loop indvars

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 1 16:09:56 PST 2021


congzhe created this revision.
congzhe added reviewers: Whitney, bmahjour.
congzhe added projects: LLVM, LoopOptWG.
Herald added a subscriber: hiraditya.
congzhe requested review of this revision.
Herald added a subscriber: llvm-commits.

Currently loop interchange only works when the outer loop has one induction variable. This patch extends it to work with more than one outer induction variables. After interchange, reduction phis in the original outer loop header should be moved to the original inner loop header, which becomes the outer loop header. All other phis, i.e., induction phis, stay in the original position.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114916

Files:
  llvm/lib/Transforms/Scalar/LoopInterchange.cpp
  llvm/test/Transforms/LoopInterchange/interchangeable-outerloop-multiple-indvars.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114916.391160.patch
Type: text/x-patch
Size: 12261 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211202/8c602073/attachment.bin>


More information about the llvm-commits mailing list