[llvm-dev] reg getInductionVariable

Dangeti Tharun kumar via llvm-dev llvm-dev at lists.llvm.org
Sat Dec 14 06:23:38 PST 2019


The function getInductionVariable mandates the loop to be in "SimplifyForm".

Loop::getInductionVariable(ScalarEvolution &SE) {
  if (!isLoopSimplifyForm())
    return nullptr;

bool Loop::isLoopSimplifyForm() {
   return getLoopPreheader() && getLoopLatch() && hasDedicatedExits();

/// Return true if no exit block for the loop has a predecessor that is
/// outside the loop.
bool hasDedicatedExits() const;

Is it necessary for the loop to have *DedicatedExists *to find the
induction variable?
Can this condition be relaxed?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20191214/dea94035/attachment.html>

More information about the llvm-dev mailing list