[PATCH] D31613: [LoopPeeling] Get rid of Phis that become invariant after N steps
Max Kazantsev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 5 08:22:24 PDT 2017
mkazantsev added inline comments.
================
Comment at: lib/Transforms/Utils/LoopUnrollPeel.cpp:137
}
+
+ // If we found that this Phi lies in an invariant chain, update the map.
----------------
sanjoy wrote:
> One TODO here would be to consider some minor binary operations as well, like:
>
> ```
> A = PHI(0, C)
> B = PHI(0, 5)
> C = B + 1
> ```
>
> Ideally the depth of `A` should be `2`, not `0`.
Good catch!
https://reviews.llvm.org/D31613
More information about the llvm-commits
mailing list