From: Jan Hubicka <hubicka@ucw.cz>
To: gcc-patches@gcc.gnu.org
Subject: Avoid redundant DECL_ASSEMBLER_NAME computations for ODR types
Date: Fri, 26 Feb 2016 10:52:00 -0000 [thread overview]
Message-ID: <20160226105249.GC94603@kam.mff.cuni.cz> (raw)
Hi,
while looking into the PR testcase I noticed that we detect wrong duplicate
types. This is because we compute DECL_ASSEMBLER_NAME of a type variant which
is not necessary.
Bootstrapped/regested x86_64-linux and I checked dumps of xalancbmk to verify
that nothing changes in ODR type merging except for the duplicates. OK?
Honza
* tree.c (need_assembler_name_p): Do not compute mangled name for
variabt types.
Index: tree.c
===================================================================
--- tree.c (revision 233707)
+++ tree.c (working copy)
@@ -5329,6 +5329,7 @@ need_assembler_name_p (tree decl)
&& TREE_CODE (decl) == TYPE_DECL
&& DECL_NAME (decl)
&& decl == TYPE_NAME (TREE_TYPE (decl))
+ && TYPE_MAIN_VARIANT (TREE_TYPE (decl)) == TREE_TYPE (decl)
&& !TYPE_ARTIFICIAL (TREE_TYPE (decl))
&& (type_with_linkage_p (TREE_TYPE (decl))
|| TREE_CODE (TREE_TYPE (decl)) == INTEGER_TYPE)
next reply other threads:[~2016-02-26 10:52 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-26 10:52 Jan Hubicka [this message]
2016-02-26 11:05 ` Jakub Jelinek
2016-02-26 11:13 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160226105249.GC94603@kam.mff.cuni.cz \
--to=hubicka@ucw.cz \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).