[PATCH] D109054: [SImplifyCFG] Preserve knowledge about guarding condition by adding assume

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 7 23:12:57 PDT 2021


mkazantsev added a comment.

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

> In general, i wonder if we should always be doing such a thing in situations like this.
> There's potential the increase in block sizes will result in some other optimizations starting to fail.

If the removed condition is implied by another dominating condition, then we should theoretically still have all facts even after removal. It does not mean every patch *will* be able to infer it, but they *could*. But in this case, the removed condition might not be inferrable, because it is deleted based on something which is not (directly) related to it. So it makes sense to leave the assume in place.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D109054



More information about the llvm-commits mailing list