Make demanded bits lazy
authorJames Molloy <james.molloy@arm.com>
Thu, 8 Oct 2015 12:39:50 +0000 (12:39 +0000)
committerJames Molloy <james.molloy@arm.com>
Thu, 8 Oct 2015 12:39:50 +0000 (12:39 +0000)
commitcbaa85372d18c010007289fb784a253ba01fd360
tree5fe63098ac93c94699da069b9c977ae19eebbd6b
parent30ead638b8b7ad4d70d25ef3c70f0d6b21522784
Make demanded bits lazy

The algorithm itself is still eager, but it doesn't get run until a
query function is called. This greatly reduces the compile-time impact
of requiring DemandedBits when at runtime it is not often used.

NFCI.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249685 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/DemandedBits.h
lib/Analysis/DemandedBits.cpp