From: Marc Glisse <marc.glisse@inria.fr>
To: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: [i386] __builtin_ia32_stmxcsr could be pure
Date: Sat, 03 Jun 2017 19:05:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.20.1706032058510.6395@stedding.saclay.inria.fr> (raw)
In-Reply-To: <CAFiYyc1X81Myu3KW9E=AkYFpq=EKtvXfZ74Hu7aNn2Ry7Ksi4g@mail.gmail.com>
Hello,
I don't think Richard's "sounds good" was meant as "ok to commit". Does an
x86 maintainer want to approve or criticize the patch?
https://gcc.gnu.org/ml/gcc-patches/2017-05/msg02009.html
On Fri, 26 May 2017, Richard Biener wrote:
> On Fri, May 26, 2017 at 10:55 AM, Marc Glisse <marc.glisse@inria.fr> wrote:
>> Hello,
>>
>> glibc marks fegetround as a pure function. On x86, people tend to use
>> _MM_GET_ROUNDING_MODE instead, which could benefit from the same. I think it
>> is safe, but a second opinion would be welcome.
>
> Sounds good. The important part is to keep the dependency to SET_ROUNDING_MODE
> which is done via claiming both touch global memory.
>
>> I could have handled just this builtin, but it seemed better to provide
>> def_builtin_pure (like "const" already has) since there should be other
>> builtins that can be marked this way (maybe the gathers?).
>
> Should work for gathers. They could even use stronger guarantees,
> namely a fnspec with "..R" (the pointer argument is only read from directly).
> Similarly scatter can use ".W" (the pointer argument is only written to
> directly).
>
> Richard.
>
>> Bootstrap+testsuite on x86_64-pc-linux-gnu with default languages.
>>
>> 2017-05-29 Marc Glisse <marc.glisse@inria.fr>
>>
>> gcc/
>> * config/i386/i386.c (struct builtin_isa): New field pure_p.
>> Reorder for compactness.
>> (def_builtin, def_builtin2, ix86_add_new_builtins): Handle pure_p.
>> (def_builtin_pure, def_builtin_pure2): New functions.
>> (ix86_init_mmx_sse_builtins) [__builtin_ia32_stmxcsr]: Mark as pure.
>>
>> gcc/testsuite/
>> * gcc.target/i386/getround.c: New file.
>>
>> --
>> Marc Glisse
>
--
Marc Glisse
next prev parent reply other threads:[~2017-06-03 19:05 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-26 8:57 Marc Glisse
2017-05-26 9:13 ` Richard Biener
2017-06-03 19:05 ` Marc Glisse [this message]
2017-06-20 21:34 ` Marc Glisse
2017-06-21 7:43 Uros Bizjak
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=alpine.DEB.2.20.1706032058510.6395@stedding.saclay.inria.fr \
--to=marc.glisse@inria.fr \
--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).