public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Uros Bizjak <ubizjak@gmail.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: "Peryt, Sebastian" <sebastian.peryt@intel.com>,
		"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: Fri, 11 May 2018 06:31:00 -0000	[thread overview]
Message-ID: <CAFULd4YDyUgU7X1azbXj-UiU0NaTRB7zkW2TBMMPOR8cyPgsCA@mail.gmail.com> (raw)
In-Reply-To: <20180511004432.chrv7gicfrmzd6sw@two.firstfloor.org>

On Fri, May 11, 2018 at 2:44 AM, Andi Kleen <andi@firstfloor.org> wrote:
>> @@ -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?
>
> With the vartrace patch, which was the next patch in the original
> patchkit, the compiler can generate a lot of ptwrite builtins,
> and adding so many edges can slow it down. I originally copied
> this from the MPX builtins (which had the same problem).

Please add new def_builtin_noedge2 (or something appropriately named)
aux function and declare these two new builtins manually in
ix86_init_mmx_sse_builtins.

Uros.

  reply	other threads:[~2018-05-11  6:09 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
2018-05-11  1:57     ` Andi Kleen
2018-05-11  6:31       ` Uros Bizjak [this message]
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=CAFULd4YDyUgU7X1azbXj-UiU0NaTRB7zkW2TBMMPOR8cyPgsCA@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).