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

Congzhe Cao via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jan 8 17:03:39 PST 2022


congzhe updated this revision to Diff 398385.
congzhe added a comment.

Thanks for the comments, I've updated the patch accordingly. @bmahjour

The updates include:

1. Reworked on test cases, made them cleaner by renaming IR variable names and removing unnecessary instructions, etc. Specifically, I made the tests more canonical by not relying on zero initialization of globals but using standard PHI nodes with proper intial values. The loop exit conditions are also updated and now cover different scenarios.

2. Updated the code in LoopInterchange.cpp. Especially, after investigation I now find `OuterLoopInductions` is not necessarily needed and the current pass trivially supports multiple outer loop indvars already. This is resulted from my previous patch https://reviews.llvm.org/D102743 which has properly handled PHI node movements.

So I removed `OuterLoopInduction` which I added to this patch earlier.

I'd appreciate any further comment, thanks in advance.


Repository:
  rG LLVM Github Monorepo

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

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.398385.patch
Type: text/x-patch
Size: 14205 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220109/1e36ae38/attachment.bin>


More information about the llvm-commits mailing list