This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Function specific options: Fix regressions, C++ support
- From: Richard Guenther <rguenther at suse dot de>
- To: Richard Guenther <richard dot guenther at gmail dot com>
- Cc: Michael Meissner <gnu at the-meissners dot org>, Jan Hubicka <jh at suse dot cz>, jason at redhat dot com, Mark Mitchell <mark at codesourcery dot com>, nathan at codesourcery dot com, gcc-patches at gcc dot gnu dot org
- Date: Tue, 5 Aug 2008 12:09:52 +0200 (CEST)
- Subject: Re: [PATCH] Function specific options: Fix regressions, C++ support
- References: <20080805035909.GA25370@tiktok.the-meissners.org> <84fc9c000808050146i65bd62e3v85a011d17ea1ff01@mail.gmail.com>
On Tue, 5 Aug 2008, Richard Guenther wrote:
> On Tue, Aug 5, 2008 at 5:59 AM, Michael Meissner <gnu@the-meissners.org> wrote:
> > This patch should fix some of the problems that have been noted with function
> > specific option support. I 3 staged an x86_64 target and ran make check.
> > There was one regression (pr36997), which is a new test, that fails under -m32
> > because the __builtin_ia32_paddq is not defined without the -msse2 option and I
> > fixed the test.
> >
> > The changes in this patch are:
> >
> > 1) I disabled hot/cold functions from changing the optimization level by
> > default. This should fix the Spec regression that Richard noticed. It would
> > be helpful if this patch could be tested to make sure it does fix the
> > regression before I commit it.
>
> I applied your earlier patch to our SPEC 2k6 tester and that didn't make
> any difference. So it must be another change between revs 138121 and
> 138141 (that _must_ be the drop unit-at-a-time mode change), or
> maybe 138171 (that includes your changes and the DECL_INLINE change).
Looking over the unit-at-a-time patch the following looks suspicious:
@@ -448,20 +448,17 @@ tree_rest_of_compilation (tree fndecl)
}
}
- if (!flag_inline_trees)
+ DECL_SAVED_TREE (fndecl) = NULL;
+ if (DECL_STRUCT_FUNCTION (fndecl) == 0
+ && !cgraph_node (fndecl)->origin)
{
- DECL_SAVED_TREE (fndecl) = NULL;
- if (DECL_STRUCT_FUNCTION (fndecl) == 0
- && !cgraph_node (fndecl)->origin)
- {
- /* Stop pointing to the local nodes about to be freed.
- But DECL_INITIAL must remain nonzero so we know this
- was an actual function definition.
- For a nested function, this is done in
c_pop_function_context.
- If rest_of_compilation set this to 0, leave it 0. */
- if (DECL_INITIAL (fndecl) != 0)
- DECL_INITIAL (fndecl) = error_mark_node;
- }
+ /* Stop pointing to the local nodes about to be freed.
+ But DECL_INITIAL must remain nonzero so we know this
+ was an actual function definition.
+ For a nested function, this is done in c_pop_function_context.
+ If rest_of_compilation set this to 0, leave it 0. */
+ if (DECL_INITIAL (fndecl) != 0)
+ DECL_INITIAL (fndecl) = error_mark_node;
}
input_location = saved_loc;
before the patch if flag_inline_trees was != 0 we preserved the
function bodies while now we do not. Either this is something
that could save some memory on the 4.3 branch as well, or it will
make some inlining impossible?
Richard.