OSDN Git Service

Take indirect branch into account as well when folding.
authorXin Tong <trent.xin.tong@gmail.com>
Mon, 1 May 2017 17:15:37 +0000 (17:15 +0000)
committerXin Tong <trent.xin.tong@gmail.com>
Mon, 1 May 2017 17:15:37 +0000 (17:15 +0000)
commit7da1589b90521887b33b386e38c9f352341aebea
tree6c4d449d9eca8d9a7d30b7a5208595d56d56c805
parent2602782e164899d4d79cc4f4c82564ee3810b4e7
Take indirect branch into account as well when folding.

We may not be able to rewrite indirect branch target, but we also want to take it into
account when folding, i.e. if it and all its successor's predecessors go to the same
destination, we can fold, i.e. no need to thread.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@301816 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Scalar/JumpThreading.cpp
test/Transforms/JumpThreading/fold-not-thread.ll