[PATCH] D44199: [LoopRotate] Attempt to Rotate loops if it can lead to removing phi nodes.
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 7 11:58:34 PST 2018
efriedma added inline comments.
================
Comment at: lib/Transforms/Scalar/LoopRotation.cpp:181
+ if (llvm::any_of(Phi.users(), [L](const User *U) {
+ return !isa<PHINode>(U) || (isa<Instruction>(U) &&
+ L->contains(cast<const Instruction>(U)));
----------------
A user of an Instruction is always an Instruction, so the isa<> is redundant.
This heuristic doesn't seem very general; it's not clear to me why we specifically want to rotate in cases like this, as opposed to peeling or something like that.
https://reviews.llvm.org/D44199
More information about the llvm-commits
mailing list