Move logic from JumpThreading into LazyValue info to simplify caller.
authorPhilip Reames <listmail@philipreames.com>
Tue, 16 Jun 2015 00:49:59 +0000 (00:49 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 16 Jun 2015 00:49:59 +0000 (00:49 +0000)
commit9426133890213842c8c994113e196f3aca6d5f70
tree5689b1ba94be328356531f7a4c0a390f85de320b
parent5449852030889d0e5cb5b350f9018efe1d147313
Move logic from JumpThreading into LazyValue info to simplify caller.

This change is hopefully NFC. The only tricky part is that I changed the context instruction being used to the branch rather than the comparison. I believe both to be correct, but the branch is strictly more powerful. With the moved code, using the branch instruction is required for the basic block comparison test to return the same result. The previous code was able to directly access both the branch and the comparison where the revised code is not.

Differential Revision: http://reviews.llvm.org/D9652

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@239797 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/LazyValueInfo.cpp
lib/Transforms/Scalar/JumpThreading.cpp