[LVI] Cut short search if we know we can't return a useful result
authorPhilip Reames <listmail@philipreames.com>
Tue, 26 Apr 2016 23:27:33 +0000 (23:27 +0000)
committerPhilip Reames <listmail@philipreames.com>
Tue, 26 Apr 2016 23:27:33 +0000 (23:27 +0000)
commitf105db4fc3541b9df9f30040d644a5b32d6d3cf2
treecb61291c8f0854dd1a67bb6370ec466ff32ba1ac
parente9e3631aba58eb400c9c4e16c2ae5e038e7ebfe3
[LVI] Cut short search if we know we can't return a useful result

Previously we were recursing on our operands for unary and binary operators regardless of whether we knew how to reason about the operator in question.  This has the effect of doing a potentially large amount of work, only to throw it away.  By checking whether the operation is one LVI can handle, we can cut short the search and return the (overdefined) answer more quickly.  The quality of the results produced should not change.

llvm-svn: 267626
llvm/lib/Analysis/LazyValueInfo.cpp