> Both tests are protected by there being exactly one latch in the loop (we
> exit early if there's not one latch). I'm not sure what makes the
> LoopContinuePredicate check safer?

You can have a loop with a single latch but an arbitrary number of
assumes (= n).  In such a loop, you'll still end up calling
isImpliedCond O(n!) times because of the assumes (and the guard
on there being only one latch won't help).

OTOH if the loop has multiple latches = m > 1, then we exit early we
won't recurse at all, we'll just bail early from
isLoopBackedgeGuardedByCond because of the check you mention (not
ideal, but safe).

-- Sanjoy
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to