OSDN Git Service

Teach jump threading some more simple tricks:
authorChris Lattner <sabre@nondot.org>
Wed, 3 Dec 2008 07:48:08 +0000 (07:48 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 3 Dec 2008 07:48:08 +0000 (07:48 +0000)
commit421fa9e32e445c972df4a981c60fbec4e21ac187
tree46eeb4f65d8c30446314a16cc0ac8d1a146e41d6
parent2973a25dbc0ee1081e34421e53b8f4308b624854
Teach jump threading some more simple tricks:

1) have it fold "br undef", which does occur with
   surprising frequency as jump threading iterates.
2) teach j-t to delete dead blocks.  This removes the successor
   edges, reducing the in-edges of other blocks, allowing
   recursive simplification.
3) Fold things like:
     br COND, BBX, BBY
  BBX:
     br COND, BBZ, BBW

   which also happens because jump threading iterates.

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