[PATCH] D60565: [LOOPINFO] Extend Loop object to add utilities to get the loop bounds, step, induction variable, and guard branch.
Whitney via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed May 1 07:35:46 PDT 2019
Whitney added inline comments.
================
Comment at: llvm/include/llvm/Analysis/LoopInfo.h:620
+ // Set the initial value of the loop induction variable, given the loop
+ // induction variable.
+ void setInitialIVValue(PHINode &IndVar);
----------------
kbarton wrote:
> Can IndVar be made const?
No, because isInductionPHI() takes a non const IndVar.
================
Comment at: llvm/lib/Analysis/LoopInfo.cpp:290
+/// one successor dominates the loop preheader,
+/// and a loop exit block dominates the other successor.
+/// Example:
----------------
jdoerfert wrote:
> "and a definite successor of a loop exit block (trivially) post-dominates the other successor.
> The second condition ensures the branch is a control dependence of the loop."
exit block -> ....-> the other successor
exit block dominates the other successor...
why should it change to successor of loop exit block (trivially) post dominates the other successor?
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60565/new/
https://reviews.llvm.org/D60565
More information about the llvm-commits
mailing list