Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
Is this save?
For normal accesses, we can probably say that the different iterations
of a statement will always access the same set of memory locations,
independently of the schedule of this statement. If the original
accesses have been aligned to a certain boundary before, they accesses
of the rescheduled statements will be aligned again.
Regarding user modified access functions. The above reasoning only holds
if the new access function does only access data locations that have
also been accessed by this statement when using the old access function.
If we modified access functions to use data locations that have been
used in the scop, but not in the very same statement, this
assumption does not hold, as the uses in the other statement may have a
different alignment.
I see three approaches here:
- Leave it as it is.
- Have the jscop-importer check that access functions are only modified in the way described above.
- Compute the new alignment correctly, by first deriving the alignment of the base ptr based on the alignments of the accesses and then recompute the alignment of the accesses from the possibly modified access function.
- feels unsatisfying to me 3) would be nice to have, but is probably
too involved for this patch. 2) is hopefully just a two line change and
could possibly save us in the future.
Cheers,
Tobias
(You also miss a test case)