[PATCH] [Polly] Align copied load/store instructions as the original.
tobias at grosser.es
Wed Oct 1 07:01:00 PDT 2014
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
I see three approaches here:
1) Leave it as it is.
2) Have the jscop-importer check that access functions are only modified
in the way described above.
3) 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
1) 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.
(You also miss a test case)
More information about the llvm-commits