summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-11-12 04:57:13 +0000
committerChris Lattner <sabre@nondot.org>2009-11-12 04:57:13 +0000
commit22db4b5e0ce40255127e97ec2605f539d254755a (patch)
treeb1c443df681ff4efd5279844936d171a75ec81ec /llvm/lib/Transforms
parentc893c4ed101307b08cda4cbbdc10b36ce59a4608 (diff)
downloadbcm5719-llvm-22db4b5e0ce40255127e97ec2605f539d254755a.tar.gz
bcm5719-llvm-22db4b5e0ce40255127e97ec2605f539d254755a.zip
various fixes to the lattice transfer functions.
llvm-svn: 86952
Diffstat (limited to 'llvm/lib/Transforms')
-rw-r--r--llvm/lib/Transforms/Scalar/JumpThreading.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/Scalar/JumpThreading.cpp b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
index e7a87e098d0..1bfad2d5d7e 100644
--- a/llvm/lib/Transforms/Scalar/JumpThreading.cpp
+++ b/llvm/lib/Transforms/Scalar/JumpThreading.cpp
@@ -275,6 +275,12 @@ ComputeValueKnownInPredecessors(Value *V, BasicBlock *BB,PredValueInfo &Result){
/// predecessor based on its terminator.
//
if (LVI) {
+ // FIXME: change this to use the more-rich 'getPredicateOnEdge' method if
+ // "I" is a non-local compare-with-a-constant instruction. This would be
+ // able to handle value inequalities better, for example if the compare is
+ // "X < 4" and "X < 3" is known true but "X < 4" itself is not available.
+ // Perhaps getConstantOnEdge should be smart enough to do this?
+
for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++PI) {
// If the value is known by LazyValueInfo to be a constant in a
// predecessor, use that information to try to thread this block.
OpenPOWER on IntegriCloud