make jump threading recursively simplify expressions instead of doing it
authorChris Lattner <sabre@nondot.org>
Tue, 10 Nov 2009 01:57:31 +0000 (01:57 +0000)
committerChris Lattner <sabre@nondot.org>
Tue, 10 Nov 2009 01:57:31 +0000 (01:57 +0000)
commitfddcf47a249fe3a1102257deddc996ee327a85cb
tree9e81c9895575bf6cb199c767730b9b391e46a44f
parent9f3ce36d7e58ec76442a2545782c69fcbac2a757
make jump threading recursively simplify expressions instead of doing it
just one level deep.  On the testcase we go from getting this:

F1:                                               ; preds = %T2
  %F = and i1 true, %cond                         ; <i1> [#uses=1]
  br i1 %F, label %X, label %Y

to a fully threaded:

F1:                                               ; preds = %T2
  br label %Y

This changes gets us to the point where we're forming (too many) switch
instructions on doug's strswitch testcase.

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