Take alignment into account in isSafeToLoadUnconditionally. Separated from the D9791.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Analysis/Loads.cpp | ||
---|---|---|
69 ↗ | (On Diff #27758) | Please clarify comment as to *why* we want this. |
137 ↗ | (On Diff #27758) | 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 ↗ | (On Diff #27758) | Why should the native alignment of the pointee type influence anything? We can freely bitcast pointers before loading. |
lib/Analysis/Loads.cpp | ||
---|---|---|
137 ↗ | (On Diff #27758) | 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 ↗ | (On Diff #27758) | 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 ↗ | (On Diff #27758) | That is a part of load specification: |