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

Xin Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 22 09:41:07 PDT 2018


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.


Repository:
  rL LLVM

https://reviews.llvm.org/D48181





More information about the llvm-commits mailing list