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

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 12 00:51:46 PDT 2021


fhahn added a comment.

> As a result, all loops will be simplified regardless of whether anything ends up being flattened.

Not sure if we should simplify loops where there's nothing to flatten, e.g. loops that are not nested?



================
Comment at: llvm/test/Transforms/LoopFlatten/loop-flatten-simplify-cfg.ll:5
+;; It was generated by running following command:
+;; clang test.c -target aarch64-arm-none-eabi -Ofast -mllvm -enable-loop-flatten -fno-vectorize -fno-unroll-loops -S -emit-llvm -mllvm -opt-bisect-limit=50 -S -emit-llvm
+;; Where test.c:
----------------
Personally I do not think this line here is helpful. Options change, the bisect limit can change and so on, making it unlikely that the IR can be reproduced in a few years....

The IR test itself could be a bit simplified to make it slightly easier to read (e.g. use the same sized type for all values, so no extra zext/sext are needed.

That way, there should be no need to add a C reference, because the IR is already quite simple.


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

https://reviews.llvm.org/D102249



More information about the llvm-commits mailing list