[Patch, fortran] [31/66] inline sum and product: Update the scalarizer: Split gfc_conv_loop_setup.

Mikael Morin mikael.morin@sfr.fr
Thu Oct 27 23:32:00 GMT 2011


Loop-centered functions will be called recursively to handle nested loops.
This is the case of gfc_conv_loop_setup. However, gfc_conv_loop_setup has
a tempoary handling part in the middle which doesn't need to be called
recursively. This patch moves the beginning and ending of gfc_conv_loop_setup
into functions of their own, so that they can be called recursively (later).

To share gfc_conv_loop_setup's loopspec local variable in the three functions,
we store it into gfc_loopinfo's specloop field (which existed, but was
completely unused before).
OK?
-------------- next part --------------
2011-10-19  Mikael Morin  <mikael@gcc.gnu.org>

	* trans-array.c (set_loop_bounds): Separate the beginning of
	gfc_conv_loop_setup into a function of its own.
	(set_delta): Separate the end of gfc_conv_loop_setup into a function
	of its own.
	(gfc_conv_loop_setup): Call set_loop_bounds and set delta.
	(set_loop_bounds, set_delta, gfc_conv_loop_setup): Make loopspec a
	pointer to the specloop field from the loop struct.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pr43829-31.patch
Type: text/x-diff
Size: 2875 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/fortran/attachments/20111027/aede3127/attachment.bin>


More information about the Fortran mailing list