[PATCH] D102249: [LoopFlatten] Simplify loops so that the pass can operate on unsimplified loops.

Stelios Ioannou via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 11 09:04:26 PDT 2021


stelios-arm created this revision.
stelios-arm added reviewers: dmgreen, SjoerdMeijer, sanwou01, samparker, NickGuy, fhahn.
Herald added a subscriber: hiraditya.
stelios-arm requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

The loop flattening pass requires loops to be in simplified form. If the
loops are not in simplified form, the pass cannot operate. This patch
simplifies all loops before flattening. As a result, all loops will be
simplified regardless of whether anything ends up being flattened.

This change was inspired by observing a certain loop that was not flatten
because the loops were not in simplified form. This loop is added as a
test to verify that it is now flattened.


https://reviews.llvm.org/D102249

Files:
  llvm/lib/Transforms/Scalar/LoopFlatten.cpp
  llvm/test/Transforms/LoopFlatten/loop-flatten-simplify-cfg.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D102249.344424.patch
Type: text/x-patch
Size: 4740 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210511/24e91bd1/attachment.bin>


More information about the llvm-commits mailing list