[PATCH] D56081: [LoopPredication] Support explicit guards

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 16 17:37:53 PST 2019


reames accepted this revision.
reames added a comment.
This revision is now accepted and ready to land.

LGTM w/required changes.



================
Comment at: lib/Transforms/Scalar/LoopPredication.cpp:226
+static cl::opt<bool>
+    PredicateExplicitGuards("loop-predication-predicate-explicit-guards", cl::Hidden,
+                        cl::desc("Whether or not we should predicate guards "
----------------
Same terminology point as made in other reviews.


================
Comment at: lib/Transforms/Scalar/LoopPredication.cpp:651
+  LLVM_DEBUG(dbgs() << "Processing explicit guard:\n");
+  LLVM_DEBUG(Guard->dump());
+
----------------
Remove


================
Comment at: lib/Transforms/Scalar/LoopPredication.cpp:662
+  // resulting list of subconditions in Checks vector.
+  BinaryOperator *GuardCondition = cast<BinaryOperator>(Guard->getCondition());
+  auto *Cond = GuardCondition->getOperand(0);
----------------
You repeat this logic a bunch of time (across patches).  Factor out a matcher.


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

https://reviews.llvm.org/D56081





More information about the llvm-commits mailing list