[PATCH] D103316: Hoist llvm.assume into single predecessor if block otherwise empty

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 7 07:10:10 PDT 2021


jdoerfert added a comment.

In D103316#2802200 <https://reviews.llvm.org/D103316#2802200>, @markus wrote:

> We provide a function say `bool isBlockEmptyExceptAssumes(BasicBlock *BB)` and we update the decision making of all the existing CFG transformations to use that. We provide another function say `void hoistAssumesFromBlockKnownToBeOtherwiseEmpty(BasicBlock *BB)` that all those CFG transformations need to call during their transformation if they used that fact that any of the blocks checked out as true with the former function.
>
> Now maybe there aren't that many CFG transformations where this is relevant and maybe it integrates easily, I don't know, but it does seem like a somewhat larger change.

The above sounds sensible. To keep it small you can use it only in the transformation relevant to you right now. We can update others as we go.


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

https://reviews.llvm.org/D103316



More information about the llvm-commits mailing list