From: Uros Bizjak <ubizjak@gmail.com>
To: "Peryt, Sebastian" <sebastian.peryt@intel.com>
Cc: Andi Kleen <andi@firstfloor.org>,
"gcc-patches@gcc.gnu.org" <gcc-patches@gcc.gnu.org>,
"Metzger, Markus T" <markus.t.metzger@intel.com>,
Andi Kleen <ak@linux.intel.com>
Subject: Re: [PATCH 1/3] Add PTWRITE builtins for x86
Date: Wed, 09 May 2018 12:11:00 -0000 [thread overview]
Message-ID: <CAFULd4bAfTAcX5DeheEK6biz2r6QhepmS4CAejtj43HRsgeDWQ@mail.gmail.com> (raw)
In-Reply-To: <17623B198193D741876BD81A6E3AE5AD3C6AA8EA@irsmsx111.ger.corp.intel.com>
On Wed, May 9, 2018 at 1:23 PM, Peryt, Sebastian
<sebastian.peryt@intel.com> wrote:
> I have rebased this patch to the latest trunk and addressed comments. Also, there was a test in changelog,
> but not in the patch itself - this has been added.
>
> Is it ok for trunk and backport to GCC-8 after few days?
>
> gcc/
>
> * common/config/i386/i386-common.c (OPTION_MASK_ISA_PTWRITE_SET,
> OPTION_MASK_ISA_PTWRITE_UNSET): New.
> (ix86_handle_option): Handle OPT_mptwrite.
> * config/i386/cpuid.h (bit_PTWRITE): Add.
> * config/i386/driver-i386.c (host_detect_local_cpu): Detect
> PTWRITE CPUID.
> * config/i386/i386-builtin.def (PTWRITE): Add PTWRITE.
> * config/i386/i386-c.c (ix86_target_macros_internal):
> Support __PTWRITE__.
> * config/i386/i386.c (ix86_target_string): Add -mptwrite.
> (ix86_valid_target_attribute_inner_p): Support ptwrite.
> (ix86_init_mmx_sse_builtins): Add edges detection for ptwrites
> generated by vartrace.
> * config/i386/i386.h (TARGET_PTWRITE): Add.
> (TARGET_PTWRITE_P): Add.
> * config/i386/i386.md: Add ptwrite.
> * config/i386/i386.opt: Add -mptwrite.
> * config/i386/immintrin.h (target):
> (_ptwrite64): Add.
> (_ptwrite32): Add.
> * doc/extend.texi: Document ptwrite builtins.
> * doc/invoke.texi: Document -mptwrite.
>
> gcc/testsuite/
>
> * gcc.target/i386/ptwrite-1.c: New test.
@@ -31325,7 +31329,21 @@ ix86_init_mmx_sse_builtins (void)
continue;
ftype = (enum ix86_builtin_func_type) d->flag;
- def_builtin2 (d->mask, d->name, ftype, d->code);
+ decl = def_builtin2 (d->mask, d->name, ftype, d->code);
+
+ /* Avoid edges for ptwrites generated by vartrace pass. */
+ if (decl)
+ {
+ DECL_ATTRIBUTES (decl) = build_tree_list (get_identifier ("leaf"),
+ NULL_TREE);
+ TREE_NOTHROW (decl) = 1;
+ }
+ else
+ {
+ ix86_builtins_isa[(int)d->code].leaf_p = true;
+ ix86_builtins_isa[(int)d->code].nothrow_p = true;
+ }
+
Can you please explain what is the purpose of the above change?
Uros.
next prev parent reply other threads:[~2018-05-09 12:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-02-12 2:53 Andi Kleen
2018-02-12 2:53 ` [PATCH 2/3] Add a pass to automatically add ptwrite instrumentation Andi Kleen
2018-02-12 2:53 ` [PATCH 3/3] Add tests for the vartrace pass Andi Kleen
2018-02-12 21:35 ` [PATCH 1/3] Add PTWRITE builtins for x86 Joseph Myers
2018-05-09 11:29 ` Peryt, Sebastian
2018-05-09 12:11 ` Uros Bizjak [this message]
2018-05-11 1:57 ` Andi Kleen
2018-05-11 6:31 ` Uros Bizjak
2018-11-04 6:33 Andi Kleen
2018-11-08 17:10 ` Andi Kleen
2018-11-08 17:30 Uros Bizjak
2018-11-08 18:03 ` Andi Kleen
2018-11-08 18:11 ` Uros Bizjak
2018-11-10 2:54 ` Segher Boessenkool
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=CAFULd4bAfTAcX5DeheEK6biz2r6QhepmS4CAejtj43HRsgeDWQ@mail.gmail.com \
--to=ubizjak@gmail.com \
--cc=ak@linux.intel.com \
--cc=andi@firstfloor.org \
--cc=gcc-patches@gcc.gnu.org \
--cc=markus.t.metzger@intel.com \
--cc=sebastian.peryt@intel.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).