OSDN Git Service

[LVI] Infer local facts from unary expressions
authorPhilip Reames <listmail@philipreames.com>
Tue, 26 Apr 2016 21:48:16 +0000 (21:48 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 26 Apr 2016 21:48:16 +0000 (21:48 +0000)
commit7f3fd5dcbde0e35cb378739e6afc10bd0b6148a3
tree682a021613770be82f85fbfd29fa028ece33f0a9
parenta5c0577492581836621dbe21d27b769b9eadf380
[LVI] Infer local facts from unary expressions

As pointed out by John Regehr over in http://reviews.llvm.org/D19485, LVI was being incredibly stupid about applying its transfer rules. Rather than gathering local facts from the expression itself, it was simply giving up entirely if one of the inputs was overdefined. This greatly impacts the precision of the overall analysis and makes it far more fragile as well.

This patch implements only the unary operation case. Once this is in, I'll implement the same for the binary operations.

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@267609 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Analysis/LazyValueInfo.cpp
test/Transforms/CorrelatedValuePropagation/basic.ll