This patch adds a CompactValueLatticeElement class which uses
PointerIntPair to store info about the element in a compact
fashion. Something along those lines has been mentioned in
PR26921.
Most of the actual ValueLatticeElement logic is moved to
ValueLatticeElementBase. Templates are used to dispatch calls to
subtypes of ValueLatticeElementBase (which contain the actual data)
statically.
In LazyValueInfo, the compact representation is used to store the
cached values, but ValueLatticeElement is used for the temporary
objects, to avoid internalizing constant ranges unnecessarily.
I also tried to push down the conversions between the 2 representations
as far as possible. In general, we should only need to do at most
1 conversion to and from to compact representation each.
Also the plan is to use reference counting to remove ConstantRanges
from the pool as they become unused. That's not implemented yet.