HomePhabricator

Return "[LoopDeletion] Break backedge if we can prove that the loop is exited…

Authored by mkazantsev on May 26 2021, 5:39 AM.

Description

Return "[LoopDeletion] Break backedge if we can prove that the loop is exited on 1st iteration" (try 2)

The patch was reverted due to compile time impact of contextual SCEV
queries. It also appeared that it introduced a miscompile on irreducible CFG.

Changes made:

  1. isKnownPredicateAt is replaced with more lightweight isKnownPredicate;
  2. Irreducible CFG in live code is now detected and excluded from processing.

Differential Revision: https://reviews.llvm.org/D102615