This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Update optimization_default_node in ada (PR middle-end/64340)
- From: Richard Biener <rguenther at suse dot de>
- To: Jakub Jelinek <jakub at redhat dot com>,Eric Botcazou <ebotcazou at adacore dot com>,Jan Hubicka <hubicka at ucw dot cz>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Sat, 07 Feb 2015 11:28:54 +0100
- Subject: Re: [PATCH] Update optimization_default_node in ada (PR middle-end/64340)
- Authentication-results: sourceware.org; auth=none
- References: <20150206202629 dot GP1746 at tucnak dot redhat dot com>
On February 6, 2015 9:26:29 PM CET, Jakub Jelinek <jakub@redhat.com> wrote:
>Hi!
>
>As mentioned in the PR, the problem here is that the Ada FE needs to
>modify
>global_options after toplevel.c (process_options), but as for LTO we
>now use
>optimization_{default,current}_node for options of functions without
>specifial optimization node, it means the changed options aren't
>reflected
>in there.
>
>Fixed thusly, bootstrapped/regtested on x86_64-linux, ok for trunk?
Can't ada use one of the option processing langhooks or represent this change similar to optimization pragmas in other frontends?
Richard.
>2015-02-06 Jakub Jelinek <jakub@redhat.com>
>
> PR middle-end/64340
> * gcc-interface/trans.c (gigi): Recreate optimization_default_node
> and optimization_current_node after tweaking global_options.
>
>--- gcc/ada/gcc-interface/trans.c.jj 2015-01-12 18:56:10.000000000
>+0100
>+++ gcc/ada/gcc-interface/trans.c 2015-02-06 16:39:04.353363393 +0100
>@@ -678,6 +678,11 @@ gigi (Node_Id gnat_root,
> if (No_Strict_Aliasing_CP)
> flag_strict_aliasing = 0;
>
>+ /* Save the current optimization options again after the above
>possible
>+ global_options changes. */
>+ optimization_default_node = build_optimization_node
>(&global_options);
>+ optimization_current_node = optimization_default_node;
>+
> /* Now translate the compilation unit proper. */
> Compilation_Unit_to_gnu (gnat_root);
>
>
> Jakub