public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: Jan Hubicka <hubicka@ucw.cz>
Cc: Richard Biener <richard.guenther@gmail.com>,
	GCC Patches <gcc-patches@gcc.gnu.org>
Subject: PING: [PATCH] Don't mark IFUNC resolver as only called directly
Date: Thu, 26 Apr 2018 05:13:00 -0000	[thread overview]
Message-ID: <CAMe9rOr0YVXTr4GiJnmw-Wbs9EX1tZdHE-oLYFOPuhyYFobKGA@mail.gmail.com> (raw)

On Thu, Apr 12, 2018 at 3:50 PM, H.J. Lu <hjl.tools@gmail.com> wrote:
> On Thu, Apr 12, 2018 at 6:39 AM, H.J. Lu <hjl.tools@gmail.com> wrote:
>> On Thu, Apr 12, 2018 at 5:17 AM, Jan Hubicka <hubicka@ucw.cz> wrote:
>>>> On Thu, Apr 12, 2018 at 1:29 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
>>>> > Since IFUNC resolver is called indirectly, don't mark IFUNC resolver as
>>>> > only called directly.
>>>> >
>>>> > OK for trunk?
>>>> >
>>>> >
>>>> > H.J.
>>>> > ---
>>>> > gcc/
>>>> >
>>>> >         PR target/85345
>>>> >         * cgraph.h: Include stringpool.h" and "attribs.h".
>>>> >         (cgraph_node::only_called_directly_or_aliased_p): Return false
>>>> >         for IFUNC resolver.
>>>> >
>>>> > gcc/testsuite/
>>>> >
>>>> >         PR target/85345
>>>> >         * gcc.target/i386/pr85345.c: New test.
>>>> > ---
>>>> >  gcc/cgraph.h                            |  5 +++-
>>>> >  gcc/testsuite/gcc.target/i386/pr85345.c | 44 +++++++++++++++++++++++++++++++++
>>>> >  2 files changed, 48 insertions(+), 1 deletion(-)
>>>> >  create mode 100644 gcc/testsuite/gcc.target/i386/pr85345.c
>>>> >
>>>> > diff --git a/gcc/cgraph.h b/gcc/cgraph.h
>>>> > index d1ef8408497..9e195824fcc 100644
>>>> > --- a/gcc/cgraph.h
>>>> > +++ b/gcc/cgraph.h
>>>> > @@ -24,6 +24,8 @@ along with GCC; see the file COPYING3.  If not see
>>>> >  #include "profile-count.h"
>>>> >  #include "ipa-ref.h"
>>>> >  #include "plugin-api.h"
>>>> > +#include "stringpool.h"
>>>> > +#include "attribs.h"
>>>> >
>>>> >  class ipa_opt_pass_d;
>>>> >  typedef ipa_opt_pass_d *ipa_opt_pass;
>>>> > @@ -2894,7 +2896,8 @@ cgraph_node::only_called_directly_or_aliased_p (void)
>>>> >           && !DECL_STATIC_CONSTRUCTOR (decl)
>>>> >           && !DECL_STATIC_DESTRUCTOR (decl)
>>>> >           && !used_from_object_file_p ()
>>>> > -         && !externally_visible);
>>>> > +         && !externally_visible
>>>> > +         && !lookup_attribute ("ifunc", DECL_ATTRIBUTES (decl)));
>>>>
>>>> How's it handled for our own generated resolver functions?  That is,
>>>> isn't there sth cheaper than doing a lookup_attribute here?  I see
>>>> that make_dispatcher_decl nor ix86_get_function_versions_dispatcher
>>>> adds the 'ifunc' attribute (though they are TREE_PUBLIC there).
>>>
>>> Is there any drawback of setting force_output flag?
>>> Honza
>>
>> Setting force_output may prevent some optimizations.  Can we add a bit
>> for IFUNC resolver?
>>
>
> Here is the patch to add ifunc_resolver to cgraph_node. Tested on x86-64
> and i686.  Any comments?
>

PING:

https://gcc.gnu.org/ml/gcc-patches/2018-04/msg00647.html


-- 
H.J.

                 reply	other threads:[~2018-04-26  3:49 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=CAMe9rOr0YVXTr4GiJnmw-Wbs9EX1tZdHE-oLYFOPuhyYFobKGA@mail.gmail.com \
    --to=hjl.tools@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=hubicka@ucw.cz \
    --cc=richard.guenther@gmail.com \
    /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).