This is an archive of the discontinued LLVM Phabricator instance.

[LVI] Infer local facts from unary expressions
ClosedPublic

Authored by reames on Apr 25 2016, 1:10 PM.

Details

Summary

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.

Diff Detail

Event Timeline

reames updated this revision to Diff 54889.Apr 25 2016, 1:10 PM
reames retitled this revision from to [LVI] Infer local facts from unary expressions.
reames updated this object.
reames added reviewers: regehr, sanjoy, hfinkel, nicholas.
reames added a subscriber: llvm-commits.
regehr accepted this revision.Apr 25 2016, 1:18 PM
regehr edited edge metadata.

LGTM

This revision is now accepted and ready to land.Apr 25 2016, 1:18 PM
mcrosier added inline comments.Apr 25 2016, 2:04 PM
lib/Analysis/LazyValueInfo.cpp
1011

Please add a period.

When writing comments, write them as English prose, which means they should use proper capitalization, punctuation, etc.

test/Transforms/CorrelatedValuePropagation/basic.ll
420

Please add a period.

This revision was automatically updated to reflect the committed changes.