Take alignment into account in isSafeToLoadUnconditionally. Separated from the D9791.
Details
Diff Detail
Event Timeline
lib/Analysis/Loads.cpp | ||
---|---|---|
69 | Please clarify comment as to *why* we want this. | |
137 | From here on looks like a separate change. Please separate. Each logical change should be reviewed independently. Also, you should have a test case for each. | |
150 | Why should the native alignment of the pointee type influence anything? We can freely bitcast pointers before loading. |
lib/Analysis/Loads.cpp | ||
---|---|---|
137 | Logically it's a single change to take alignment into account in this function. Actually from here on the main part of the change begins. I see no reason to split it more. Test case is also provided. | |
150 | If we end up here with zero AccessedAlign it means that there is load or store instruction before without explicit alignment specification. From docs about load/stores: |
lib/Analysis/Loads.cpp | ||
---|---|---|
69 | That is a part of load specification: |
Please clarify comment as to *why* we want this.