public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: "H.J. Lu" <hjl.tools@gmail.com>
To: gcc-patches@gcc.gnu.org
Cc: Uros Bizjak <ubizjak@gmail.com>, 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: [PATCH v4 0/2] x86: Add general_regs_only function attribute
Date: Wed, 14 Apr 2021 15:39:16 -0700	[thread overview]
Message-ID: <20210414223918.230495-1-hjl.tools@gmail.com> (raw)

I realized that

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.  We need to add a
general_regs_only function attribute to go with it to mark functions
which use only general purpose registers.  When making inlining
decisions on such functions, x86 backend can exclude non-GPR compiler
options.  The general_regs_only attribute should be added to all x86
intrinsics which use only general purpose registers.

H.J. Lu (2):
  x86: Move OPTION_MASK_* to i386-common.h
  x86: Add general_regs_only function attribute

 gcc/common/config/i386/i386-common.c      | 297 ------------------
 gcc/common/config/i386/i386-common.h      | 315 +++++++++++++++++++
 gcc/config/i386/adxintrin.h               |  18 +-
 gcc/config/i386/bmi2intrin.h              |  24 +-
 gcc/config/i386/bmiintrin.h               |  92 ++++--
 gcc/config/i386/cetintrin.h               |  33 +-
 gcc/config/i386/cldemoteintrin.h          |   3 +-
 gcc/config/i386/clflushoptintrin.h        |   3 +-
 gcc/config/i386/clwbintrin.h              |   3 +-
 gcc/config/i386/clzerointrin.h            |   4 +-
 gcc/config/i386/enqcmdintrin.h            |   6 +-
 gcc/config/i386/fxsrintrin.h              |  12 +-
 gcc/config/i386/hresetintrin.h            |   3 +-
 gcc/config/i386/i386-options.c            |   2 +
 gcc/config/i386/i386.c                    |  29 +-
 gcc/config/i386/i386.h                    |   1 +
 gcc/config/i386/ia32intrin.h              |  82 +++--
 gcc/config/i386/lwpintrin.h               |  24 +-
 gcc/config/i386/lzcntintrin.h             |  20 +-
 gcc/config/i386/movdirintrin.h            |   9 +-
 gcc/config/i386/mwaitxintrin.h            |   8 +-
 gcc/config/i386/pconfigintrin.h           |   3 +-
 gcc/config/i386/pkuintrin.h               |   6 +-
 gcc/config/i386/popcntintrin.h            |   8 +-
 gcc/config/i386/rdseedintrin.h            |   9 +-
 gcc/config/i386/rtmintrin.h               |   9 +-
 gcc/config/i386/serializeintrin.h         |   8 +-
 gcc/config/i386/sgxintrin.h               |   9 +-
 gcc/config/i386/tbmintrin.h               |  80 +++--
 gcc/config/i386/tsxldtrkintrin.h          |   6 +-
 gcc/config/i386/uintrintrin.h             |  12 +-
 gcc/config/i386/waitpkgintrin.h           |   9 +-
 gcc/config/i386/wbnoinvdintrin.h          |   3 +-
 gcc/config/i386/x86gprintrin.h            |  45 ++-
 gcc/config/i386/xsavecintrin.h            |   6 +-
 gcc/config/i386/xsaveintrin.h             |  18 +-
 gcc/config/i386/xsaveoptintrin.h          |   6 +-
 gcc/config/i386/xsavesintrin.h            |  12 +-
 gcc/config/i386/xtestintrin.h             |   3 +-
 gcc/doc/extend.texi                       |   5 +
 gcc/testsuite/gcc.target/i386/pr99744-3.c |  13 +
 gcc/testsuite/gcc.target/i386/pr99744-4.c | 352 ++++++++++++++++++++++
 42 files changed, 1134 insertions(+), 476 deletions(-)
 create mode 100644 gcc/common/config/i386/i386-common.h
 create mode 100644 gcc/testsuite/gcc.target/i386/pr99744-3.c
 create mode 100644 gcc/testsuite/gcc.target/i386/pr99744-4.c

-- 
2.30.2


             reply	other threads:[~2021-04-14 22:39 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-14 22:39 H.J. Lu [this message]
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
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=20210414223918.230495-1-hjl.tools@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).