[PATCH] D98706: [SCEV] Add false->any implication to save compile time

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 18 03:39:01 PDT 2021


mkazantsev added a comment.

In D98706#2629115 <https://reviews.llvm.org/D98706#2629115>, @lebedev.ri wrote:

> That being said, i think i'm failing to understand why it implies *anything*?

Just by definition of implication: https://en.wikipedia.org/wiki/Truth_table#Logical_implication

In D98706#2630172 <https://reviews.llvm.org/D98706#2630172>, @reames wrote:

> I would suggest auditing the callers to make sure perform checks in the right order though.  This could be surprising if the caller isn't expecting to be analyzing potentially dead code.

The main users of this are `is[Loop/BasicBlock]EntryGuardedByCond`. They may be called by loop passes in arbitrary order. Imagine that a loop has been unswitched with some stay-in-loop condition turned to false. The consequent loop pass still thinks it's a loop (because dead CFG wasn't broken yet) and will analyze it as it normally would. I don't think every loop path should be doing this check on its own.


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

https://reviews.llvm.org/D98706



More information about the llvm-commits mailing list