[PATCH] D74691: [Attributor] Detect SCCs with unbounded cycles

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Feb 23 12:47:09 PST 2020


baziotis added a comment.

@omarahmed @jdoerfert

I'm in the unpleasant position to tell you that the method I proposed is wrong. `SCCIterator` uses Tarjan's algorithm which for some reason, I remembered it finds all strongly-connected components but actually, it finds only maximal.
That means, if a loop has an SCC inside it, we'll never find it since the loop is the maximal SCC. That probably means that we have to fall-back to the method that Johannes had proposed:

  As before, we identify all cycles via the depth-first search and the visited set. If a cycles is found we did bail before but now we ask LI & SE instead. If they say we found a proper loop header of a loop with a bounded trip count we can ignore that cycles and continue exploring.

I'm really sorry for that. I'll try to think if anything better can be done.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74691





More information about the llvm-commits mailing list