I'm going to move isDereferenceableAndAligned stuff from ValueTracking to Loads as Hal suggested in D10920. This functionality uses getAlignment static function which is also used by computeKnownBits machinery.
Why to Value class instead of making it a public ValueTracking function? It queries inherent properties of a Value just like isDereferenceable/getDereferenceableBytes I've introduced in D16116. All the three functions must be placed somewhere together, however I don't have strong preference about Value class being this place.
Given this code sometimes gets the ABI alignment and sometimes gets the preferred alignment, I'm not really clear on what the predicate actually is. Unless you can write a clear bit of documentation which makes it obvious, I don't think this makes sense to promote to Value.
|505 ↗||(On Diff #44748)|
It seems like this change might be based on something other than ToT. I can't find this function in IR/Value.h in ToT. Nor do I see it in the single listed dependency.