In this patch `Value::getPointerDereferenceableBytes` and
`Value::getPointerAlignment` are extracted into more powerful versions
living alongside `isDereferenceableAndAlignedPointer` in
`Analysis/Loads.h`. The functions have also been enriched wrt. GEP
support and unified wrt. value kinds they can unpack. Thus, the only
"new" logic is concerned with GEP handling everything else is
copied/moved from other places.
NOTE: One caveat is that at least one use site (ConstantFold.cpp) does
not have access to the analysis library in which the functions now live.
NOTE: Changes to downstream code should be mechanical, I used:
%s/\(\w\+\)->getPointerAlignment(/getPointerAlignment(\1, /
NOTE: Not all affected tests have been updated but only one to show how
the improved GEP logic affects alignment.