From: "H.J. Lu" <hjl.tools@gmail.com>
To: Uros Bizjak <ubizjak@gmail.com>
Cc: "gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
Jakub Jelinek <jakub@redhat.com>,
Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>,
Martin Sebor <msebor@gmail.com>,
Richard Biener <richard.guenther@gmail.com>
Subject: Re: [PATCH v4 2/2] x86: Add general_regs_only function attribute
Date: Wed, 21 Apr 2021 06:47:57 -0700 [thread overview]
Message-ID: <CAMe9rOqFebMkPOFBsO7mmariNTt_9gDJ-nxjuJB2nP+68Y=yCA@mail.gmail.com> (raw)
In-Reply-To: <CAFULd4ZpMs+5PoWFku2LiM-RWkcACnqBwrUmRJzpLg0vUAffYg@mail.gmail.com>
On Wed, Apr 21, 2021 at 12:30 AM Uros Bizjak <ubizjak@gmail.com> wrote:
>
> On Thu, Apr 15, 2021 at 12:39 AM H.J. Lu <hjl.tools@gmail.com> wrote:
> >
> > commit 87c753ac241f25d222d46ba1ac66ceba89d6a200
> > Author: H.J. Lu <hjl.tools@gmail.com>
> > Date: Fri Aug 21 09:42:49 2020 -0700
> >
> > x86: Add target("general-regs-only") function attribute
> >
> > is incomplete since it is impossible to call integer intrinsics from
> > a function with general-regs-only target attribute.
> >
> > 1. Add general_regs_only function attribute to inform the compiler that
> > functions use only general purpose registers. When making inlining
> > decisions on such functions, non-GPR compiler options are excluded.
> > 2. Add general_regs_only attribute to x86 intrinsics which use only
> > general purpose registers.
>
> I'd like to ask Richard and Jakub if they agree with the approach.
Here is the v5 patch:
https://gcc.gnu.org/pipermail/gcc-patches/2021-April/568407.html
Richard, Jakub, do they look good to you?
> On a related note, can we declare default attributes like clang does, e.g.:
>
> /* Define the default attributes for the functions. */
> #define __DEFAULT_FN_ATTRS __attribute__((__gnu_inline__,
> __always_inline__, __artificial__))
This can be defined in x86intrin.h.
> #define __DEFAULT_FN_ATTRS_GRO __attribute__((__gnu_inline__,
> __always_inline__, __general_regs_only, __artificial__))
This can be defined in x86gprintrin.h.
> and use these defines throughout header files?
>
> Uros.
>
Thanks.
--
H.J.
next prev parent reply other threads:[~2021-04-21 13:48 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-14 22:39 [PATCH v4 0/2] " H.J. Lu
2021-04-14 22:39 ` [PATCH v4 1/2] x86: Move OPTION_MASK_* to i386-common.h H.J. Lu
2021-04-14 22:39 ` [PATCH v4 2/2] x86: Add general_regs_only function attribute H.J. Lu
2021-04-21 7:30 ` Uros Bizjak
2021-04-21 13:47 ` H.J. Lu [this message]
2021-04-21 16:54 ` Martin Sebor
2021-04-21 17:09 ` Martin Sebor
2021-04-21 20:58 ` H.J. Lu
2021-04-21 23:23 ` Martin Sebor
2021-04-22 1:01 ` H.J. Lu
2021-04-22 8:27 ` Richard Biener
2021-04-22 9:02 ` Jakub Jelinek
2021-04-22 11:23 ` Richard Biener
2021-04-22 11:57 ` H.J. Lu
2021-04-22 12:16 ` Richard Biener
2021-04-22 12:22 ` Jakub Jelinek
2021-04-22 12:52 ` Richard Biener
2021-04-22 12:55 ` Richard Biener
2021-07-18 1:45 ` [PATCH v5] <x86gprintrin.h>: Add pragma GCC target("general-regs-only") H.J. Lu
2021-07-31 15:35 ` PING^1 " H.J. Lu
2021-08-03 11:47 ` Richard Biener
2021-08-03 14:45 ` [PATCH v6] " H.J. Lu
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='CAMe9rOqFebMkPOFBsO7mmariNTt_9gDJ-nxjuJB2nP+68Y=yCA@mail.gmail.com' \
--to=hjl.tools@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jakub@redhat.com \
--cc=msebor@gmail.com \
--cc=rep.dot.nop@gmail.com \
--cc=richard.guenther@gmail.com \
--cc=ubizjak@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).