[PATCH] Fix up flag_cunroll_grow_size handling in presence of optimize attr [PR96535]

Segher Boessenkool segher@kernel.crashing.org
Wed Aug 12 15:58:25 GMT 2020


Hi Jakub,

On Wed, Aug 12, 2020 at 10:20:12AM +0200, Jakub Jelinek wrote:
> This patch moves the unrolling related handling from process_options into
> finish_options which is invoked whenever the options are being finalized,
> and the rs6000 specific parts into the override_options_after_change hook
> which is called for optimize attribute handling (and unfortunately also
> th cfun changes, but what the hook does is cheap) and I've added a call to
> that from rs6000_override_options_internal, so it is also called on cmdline
> processing and for target attribute.

The rs6000 parts look fine, thank you for working on this!

One tiny thing:

> +/* This target function is similar to the hook TARGET_OPTION_OVERRIDE
> +   but is called when the optimize level is changed via an attribute or
> +   pragma or when it is reset at the end of the code affected by the
> +   attribute or pragma.  It is not called at the beginning of compilation
> +   when TARGET_OPTION_OVERRIDE is called so if you want to perform these
> +   actions then, you should have TARGET_OPTION_OVERRIDE call
> +   TARGET_OVERRIDE_OPTIONS_AFTER_CHANGE.  */

That is generic documentation.  The second half isn't relevant (you did
that already :-) )


Segher


More information about the Gcc-patches mailing list