[PATCH] D62418: [MustExecute] Improve MustExecute to correctly handle loop nest
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 19:00:07 PDT 2019
jdoerfert accepted this revision.
jdoerfert added a comment.
This revision is now accepted and ready to land.
LGTM once the two comments are adjusted.
================
Comment at: llvm/lib/Analysis/MustExecute.cpp:199
// 2) Also predecessors of BB,
// 3) Exit blocks which are not taken on 1st iteration.
// Memoize blocks we've already checked.
----------------
The comment should reflect the change.
================
Comment at: llvm/lib/Analysis/MustExecute.cpp:207
+
+ // BB dominates Pred, so if Pred runs, BB must run.
+ if (DT->dominates(BB, Pred))
----------------
The check here is basically testing if the edge is a loop latch. I think the comment should include that.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62418/new/
https://reviews.llvm.org/D62418
More information about the llvm-commits
mailing list