[PATCH] D48181: [JumpThreading] Ignore nil destionation when determining whether a block only goes to a single destination

Daniel Berlin via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 22 10:15:57 PDT 2018


On Fri, Jun 22, 2018 at 9:41 AM, Xin Tong via Phabricator via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> trentxintong added a comment.
>
> Hi @brzycki. This is a deficiency in a feature we already have. In jump
> threading, when we can tell all the predecessors of a block go to the same
> destination. we do not need to thread, we can just fold the terminator of
> the block. This has less impact on the CFG and also we do not have the
> problem of not being able to jump threading because the block can not be
> duplicated.
>
> In case we have a Val being UNDEF, we can ignore it as it can be treated
> as going to any successor, i.e. we should not go to MultipleDestSentinel
> state because we see  a DestBB==nullptr.
>
This is not generally true.
It's only true if the block is unreachable.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180622/ad89cf0b/attachment.html>


More information about the llvm-commits mailing list