* Drop target_option_node reconstruction logic.
@ 2014-11-14 19:20 Jan Hubicka
2014-11-14 20:07 ` Markus Trippelsdorf
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Jan Hubicka @ 2014-11-14 19:20 UTC (permalink / raw)
To: gcc-patches, rguenther
Hi,
this patch kills lto's code to rebuilt DECL_FUNCTION_SPECIFIC_TARGET from target
attributes. This code was never complete and it should be no-op now when we save
tehe target nodes.
It also makes free_land_data_in_decl to actually anotate all function bodies with
a default option node. The reason is that when LTOint units, one compiled with
default settings and one, say with -msse3, we want ot keep these functions preserved.
Incrementally i will proceed with similar changes for optimization nodes.
Bootstrapped/regtested ppc64-linux, earlier version tested at x86_64-linux and
firefox LTO, OK?
Honza
* lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
* tree.c (free_lang_data_in_decl): Annotate all functio nbodies with
DECL_FUNCTION_SPECIFIC_TARGET.
Index: lto/lto.c
===================================================================
--- lto/lto.c (revision 217571)
+++ lto/lto.c (working copy)
@@ -1935,15 +1935,6 @@
if (TREE_CODE (t) == INTEGER_CST
&& !TREE_OVERFLOW (t))
cache_integer_cst (t);
- /* Re-build DECL_FUNCTION_SPECIFIC_TARGET, we need that
- for both WPA and LTRANS stage. */
- if (TREE_CODE (t) == FUNCTION_DECL)
- {
- tree attr = lookup_attribute ("target", DECL_ATTRIBUTES (t));
- if (attr)
- targetm.target_option.valid_attribute_p
- (t, NULL_TREE, TREE_VALUE (attr), 0);
- }
/* Register TYPE_DECLs with the debuginfo machinery. */
if (!flag_wpa
&& TREE_CODE (t) == TYPE_DECL)
Index: tree.c
===================================================================
--- tree.c (revision 217571)
+++ tree.c (working copy)
@@ -5115,6 +5115,9 @@
the PARM_DECL will be used in the function's body). */
for (t = DECL_ARGUMENTS (decl); t; t = TREE_CHAIN (t))
DECL_CONTEXT (t) = decl;
+ if (!DECL_FUNCTION_SPECIFIC_TARGET (decl))
+ DECL_FUNCTION_SPECIFIC_TARGET (decl)
+ = target_option_default_node;
}
/* DECL_SAVED_TREE holds the GENERIC representation for DECL.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Drop target_option_node reconstruction logic.
2014-11-14 19:20 Drop target_option_node reconstruction logic Jan Hubicka
@ 2014-11-14 20:07 ` Markus Trippelsdorf
2014-11-14 20:16 ` Jan Hubicka
2014-11-15 11:05 ` Richard Biener
2014-11-19 15:56 ` H.J. Lu
2 siblings, 1 reply; 7+ messages in thread
From: Markus Trippelsdorf @ 2014-11-14 20:07 UTC (permalink / raw)
To: Jan Hubicka; +Cc: gcc-patches, rguenther
On 2014.11.14 at 20:13 +0100, Jan Hubicka wrote:
> this patch kills lto's code to rebuilt DECL_FUNCTION_SPECIFIC_TARGET from target
> attributes. This code was never complete and it should be no-op now when we save
> tehe target nodes.
> It also makes free_land_data_in_decl to actually anotate all function bodies with
> a default option node. The reason is that when LTOint units, one compiled with
> default settings and one, say with -msse3, we want ot keep these functions preserved.
FYI this patch finally fixes: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607
Thanks.
--
Markus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Drop target_option_node reconstruction logic.
2014-11-14 20:07 ` Markus Trippelsdorf
@ 2014-11-14 20:16 ` Jan Hubicka
0 siblings, 0 replies; 7+ messages in thread
From: Jan Hubicka @ 2014-11-14 20:16 UTC (permalink / raw)
To: Markus Trippelsdorf; +Cc: Jan Hubicka, gcc-patches, rguenther
> On 2014.11.14 at 20:13 +0100, Jan Hubicka wrote:
> > this patch kills lto's code to rebuilt DECL_FUNCTION_SPECIFIC_TARGET from target
> > attributes. This code was never complete and it should be no-op now when we save
> > tehe target nodes.
> > It also makes free_land_data_in_decl to actually anotate all function bodies with
> > a default option node. The reason is that when LTOint units, one compiled with
> > default settings and one, say with -msse3, we want ot keep these functions preserved.
>
> FYI this patch finally fixes: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=60607
Yes, properly combining different target flags was the main motivation (so we
get correct LTO for firefox :) Still hope to be able to finish the
optimization_node part, so combining other flags will work as expected.
If you could turn this into a testcase, it would be cool.
Honza
>
> Thanks.
> --
> Markus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Drop target_option_node reconstruction logic.
2014-11-14 19:20 Drop target_option_node reconstruction logic Jan Hubicka
2014-11-14 20:07 ` Markus Trippelsdorf
@ 2014-11-15 11:05 ` Richard Biener
2014-11-19 15:56 ` H.J. Lu
2 siblings, 0 replies; 7+ messages in thread
From: Richard Biener @ 2014-11-15 11:05 UTC (permalink / raw)
To: Jan Hubicka, gcc-patches
On November 14, 2014 8:13:15 PM CET, Jan Hubicka <hubicka@ucw.cz> wrote:
>Hi,
>this patch kills lto's code to rebuilt DECL_FUNCTION_SPECIFIC_TARGET
>from target
>attributes. This code was never complete and it should be no-op now
>when we save
>tehe target nodes.
>It also makes free_land_data_in_decl to actually anotate all function
>bodies with
>a default option node. The reason is that when LTOint units, one
>compiled with
>default settings and one, say with -msse3, we want ot keep these
>functions preserved.
>
>Incrementally i will proceed with similar changes for optimization
>nodes.
>
>Bootstrapped/regtested ppc64-linux, earlier version tested at
>x86_64-linux and
>firefox LTO, OK?
OK.
Thanks,
Richard.
>Honza
>
> * lto.c (lto_read_decls): Do not rebuild
>DECL_FUNCTION_SPECIFIC_TARGET.
> * tree.c (free_lang_data_in_decl): Annotate all functio nbodies with
> DECL_FUNCTION_SPECIFIC_TARGET.
>Index: lto/lto.c
>===================================================================
>--- lto/lto.c (revision 217571)
>+++ lto/lto.c (working copy)
>@@ -1935,15 +1935,6 @@
> if (TREE_CODE (t) == INTEGER_CST
> && !TREE_OVERFLOW (t))
> cache_integer_cst (t);
>- /* Re-build DECL_FUNCTION_SPECIFIC_TARGET, we need that
>- for both WPA and LTRANS stage. */
>- if (TREE_CODE (t) == FUNCTION_DECL)
>- {
>- tree attr = lookup_attribute ("target", DECL_ATTRIBUTES (t));
>- if (attr)
>- targetm.target_option.valid_attribute_p
>- (t, NULL_TREE, TREE_VALUE (attr), 0);
>- }
> /* Register TYPE_DECLs with the debuginfo machinery. */
> if (!flag_wpa
> && TREE_CODE (t) == TYPE_DECL)
>Index: tree.c
>===================================================================
>--- tree.c (revision 217571)
>+++ tree.c (working copy)
>@@ -5115,6 +5115,9 @@
> the PARM_DECL will be used in the function's body). */
> for (t = DECL_ARGUMENTS (decl); t; t = TREE_CHAIN (t))
> DECL_CONTEXT (t) = decl;
>+ if (!DECL_FUNCTION_SPECIFIC_TARGET (decl))
>+ DECL_FUNCTION_SPECIFIC_TARGET (decl)
>+ = target_option_default_node;
> }
>
> /* DECL_SAVED_TREE holds the GENERIC representation for DECL.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Drop target_option_node reconstruction logic.
2014-11-14 19:20 Drop target_option_node reconstruction logic Jan Hubicka
2014-11-14 20:07 ` Markus Trippelsdorf
2014-11-15 11:05 ` Richard Biener
@ 2014-11-19 15:56 ` H.J. Lu
2014-11-19 18:16 ` Jan Hubicka
2 siblings, 1 reply; 7+ messages in thread
From: H.J. Lu @ 2014-11-19 15:56 UTC (permalink / raw)
To: Jan Hubicka; +Cc: GCC Patches, Richard Guenther
On Fri, Nov 14, 2014 at 11:13 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> Hi,
> this patch kills lto's code to rebuilt DECL_FUNCTION_SPECIFIC_TARGET from target
> attributes. This code was never complete and it should be no-op now when we save
> tehe target nodes.
> It also makes free_land_data_in_decl to actually anotate all function bodies with
> a default option node. The reason is that when LTOint units, one compiled with
> default settings and one, say with -msse3, we want ot keep these functions preserved.
>
> Incrementally i will proceed with similar changes for optimization nodes.
>
> Bootstrapped/regtested ppc64-linux, earlier version tested at x86_64-linux and
> firefox LTO, OK?
>
> Honza
>
> * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
> * tree.c (free_lang_data_in_decl): Annotate all functio nbodies with
> DECL_FUNCTION_SPECIFIC_TARGET.
It caused:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63917
--
H.J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Drop target_option_node reconstruction logic.
2014-11-19 15:56 ` H.J. Lu
@ 2014-11-19 18:16 ` Jan Hubicka
2014-11-19 18:44 ` H.J. Lu
0 siblings, 1 reply; 7+ messages in thread
From: Jan Hubicka @ 2014-11-19 18:16 UTC (permalink / raw)
To: H.J. Lu; +Cc: Jan Hubicka, GCC Patches, Richard Guenther
> On Fri, Nov 14, 2014 at 11:13 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
nz
> > Hi,
> > this patch kills lto's code to rebuilt DECL_FUNCTION_SPECIFIC_TARGET from target
> > attributes. This code was never complete and it should be no-op now when we save
> > tehe target nodes.
> > It also makes free_land_data_in_decl to actually anotate all function bodies with
> > a default option node. The reason is that when LTOint units, one compiled with
> > default settings and one, say with -msse3, we want ot keep these functions preserved.
> >
> > Incrementally i will proceed with similar changes for optimization nodes.
> >
> > Bootstrapped/regtested ppc64-linux, earlier version tested at x86_64-linux and
> > firefox LTO, OK?
> >
> > Honza
> >
> > * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
> > * tree.c (free_lang_data_in_decl): Annotate all functio nbodies with
> > DECL_FUNCTION_SPECIFIC_TARGET.
>
> It caused:
>
> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63917
This one seems to be abou ifcft change by Zhenqiang?
Honza
>
> --
> H.J.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Drop target_option_node reconstruction logic.
2014-11-19 18:16 ` Jan Hubicka
@ 2014-11-19 18:44 ` H.J. Lu
0 siblings, 0 replies; 7+ messages in thread
From: H.J. Lu @ 2014-11-19 18:44 UTC (permalink / raw)
To: Jan Hubicka; +Cc: GCC Patches, Richard Guenther
On Wed, Nov 19, 2014 at 10:11 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> On Fri, Nov 14, 2014 at 11:13 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
> nz
>> > Hi,
>> > this patch kills lto's code to rebuilt DECL_FUNCTION_SPECIFIC_TARGET from target
>> > attributes. This code was never complete and it should be no-op now when we save
>> > tehe target nodes.
>> > It also makes free_land_data_in_decl to actually anotate all function bodies with
>> > a default option node. The reason is that when LTOint units, one compiled with
>> > default settings and one, say with -msse3, we want ot keep these functions preserved.
>> >
>> > Incrementally i will proceed with similar changes for optimization nodes.
>> >
>> > Bootstrapped/regtested ppc64-linux, earlier version tested at x86_64-linux and
>> > firefox LTO, OK?
>> >
>> > Honza
>> >
>> > * lto.c (lto_read_decls): Do not rebuild DECL_FUNCTION_SPECIFIC_TARGET.
>> > * tree.c (free_lang_data_in_decl): Annotate all functio nbodies with
>> > DECL_FUNCTION_SPECIFIC_TARGET.
>>
>> It caused:
>>
>> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63917
> This one seems to be abou ifcft change by Zhenqiang?
>
> Honza
>>
>> --
>> H.J.
Oops. I meant:
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63967
--
H.J.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2014-11-19 18:39 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-14 19:20 Drop target_option_node reconstruction logic Jan Hubicka
2014-11-14 20:07 ` Markus Trippelsdorf
2014-11-14 20:16 ` Jan Hubicka
2014-11-15 11:05 ` Richard Biener
2014-11-19 15:56 ` H.J. Lu
2014-11-19 18:16 ` Jan Hubicka
2014-11-19 18:44 ` H.J. Lu
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).