[SCEV] Use object size for globals to sharpen ranges.
The highest address the object can start is ObjSize bytes before the end (unsigned max value). If this value is not a multiple of the alignment, the last possible start value is the next lowest multiple of the alignment. Note: The computations cannot overflow, because if they would there's no possible start address for the object. At the moment, this is limited to GlobalVariables, because I could not find a API similar to getObjectSize to also get the alignment of the object. With such an API, this can be generalized to general addresses. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D149483
Loading
Please register or sign in to comment