[Patch, fortran] [53/66] inline sum and product: Update the scalarizer: Update gfc_trans_preloop_setup.
Mikael Morin
mikael.morin@sfr.fr
Thu Oct 27 23:35:00 GMT 2011
This updates gfc_trans_preloop_setup to handle multiple loops.
The preliminary patches 1..6 have made it quite painless:
- the condition "this is the the outermost dimension" is changed from
`dim == loop->dimen - 1' to `dim == loop->dimen - 1 && loop->parent == NULL'
- to retrieve information about the parent loop:
* if we are not in the outermost dimension, the parent loop's gfc_loopinfo
struct is the current one, same for the gfc_ss struct, and the loop index
is dim + 1.
* if we are in the outermost dimension, the parent loop's gfc_loopinfo
struct is the current's parent field, same for the gfc_ss struct, and the
loop index is 0.
OK?
-------------- next part --------------
2011-10-19 Mikael Morin <mikael@gcc.gnu.org>
* trans-array.c (gfc_trans_preloop_setup): Create pointers to outer
dimension's ss and loop. Use them.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr43829-53.patch
Type: text/x-diff
Size: 2078 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111027/2d3a969c/attachment.bin>
More information about the Fortran
mailing list