public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jakub Jelinek <jakub@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/vendors/redhat/heads/gcc-10-branch)] Do not generate a unique fnname for resolver. Date: Thu, 30 Jan 2020 20:50:00 -0000 [thread overview] Message-ID: <20200130205022.73344.qmail@sourceware.org> (raw) https://gcc.gnu.org/g:c2bd2b4664be8b73f8fd58a64dec1e93871797cc commit c2bd2b4664be8b73f8fd58a64dec1e93871797cc Author: Martin Liska <mliska@suse.cz> Date: Mon Jan 27 10:48:18 2020 +0100 Do not generate a unique fnname for resolver. PR target/93274 * config/i386/i386-features.c (make_resolver_func): Align the code with ppc64 target implementation. Do not generate a unique name for resolver function. PR target/93274 * gcc.target/i386/pr81213.c: Adjust to not expect a globally unique name. Diff: --- gcc/ChangeLog | 7 +++++++ gcc/config/i386/i386-features.c | 19 ++++--------------- gcc/testsuite/ChangeLog | 6 ++++++ gcc/testsuite/gcc.target/i386/pr81213.c | 4 ++-- 4 files changed, 19 insertions(+), 17 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4507584..59806ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2020-01-27 Martin Liska <mliska@suse.cz> + + PR target/93274 + * config/i386/i386-features.c (make_resolver_func): + Align the code with ppc64 target implementation. + Do not generate a unique name for resolver function. + 2020-01-27 Richard Biener <rguenther@suse.de> PR tree-optimization/93397 diff --git a/gcc/config/i386/i386-features.c b/gcc/config/i386/i386-features.c index e580b26..b49e6f8 100644 --- a/gcc/config/i386/i386-features.c +++ b/gcc/config/i386/i386-features.c @@ -2738,26 +2738,16 @@ make_resolver_func (const tree default_decl, const tree ifunc_alias_decl, basic_block *empty_bb) { - char *resolver_name; - tree decl, type, decl_name, t; + tree decl, type, t; - /* IFUNC's have to be globally visible. So, if the default_decl is - not, then the name of the IFUNC should be made unique. */ - if (TREE_PUBLIC (default_decl) == 0) - { - char *ifunc_name = make_unique_name (default_decl, "ifunc", true); - symtab->change_decl_assembler_name (ifunc_alias_decl, - get_identifier (ifunc_name)); - XDELETEVEC (ifunc_name); - } - - resolver_name = make_unique_name (default_decl, "resolver", false); + /* Create resolver function name based on default_decl. */ + tree decl_name = clone_function_name (default_decl, "resolver"); + const char *resolver_name = IDENTIFIER_POINTER (decl_name); /* The resolver function should return a (void *). */ type = build_function_type_list (ptr_type_node, NULL_TREE); decl = build_fn_decl (resolver_name, type); - decl_name = get_identifier (resolver_name); SET_DECL_ASSEMBLER_NAME (decl, decl_name); DECL_NAME (decl) = decl_name; @@ -2809,7 +2799,6 @@ make_resolver_func (const tree default_decl, /* Create the alias for dispatch to resolver here. */ cgraph_node::create_same_body_alias (ifunc_alias_decl, decl); - XDELETEVEC (resolver_name); return decl; } diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 2de0608..22a37dd 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2020-01-27 Martin Liska <mliska@suse.cz> + + PR target/93274 + * gcc.target/i386/pr81213.c: Adjust to not expect + a globally unique name. + 2020-01-27 Richard Biener <rguenther@suse.de> PR tree-optimization/93397 diff --git a/gcc/testsuite/gcc.target/i386/pr81213.c b/gcc/testsuite/gcc.target/i386/pr81213.c index 13e15d5..89c4752 100644 --- a/gcc/testsuite/gcc.target/i386/pr81213.c +++ b/gcc/testsuite/gcc.target/i386/pr81213.c @@ -14,6 +14,6 @@ int main() return foo(); } -/* { dg-final { scan-assembler "\t.globl\tfoo\\..*\\.ifunc" } } */ +/* { dg-final { scan-assembler "\t.globl\tfoo" } } */ /* { dg-final { scan-assembler "foo.resolver:" } } */ -/* { dg-final { scan-assembler "foo\\..*\\.ifunc, @gnu_indirect_function" } } */ +/* { dg-final { scan-assembler "foo\\, @gnu_indirect_function" } } */
reply other threads:[~2020-01-30 20:50 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20200130205022.73344.qmail@sourceware.org \ --to=jakub@gcc.gnu.org \ --cc=gcc-cvs@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: linkBe 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).