public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH v2 0/7] Support partial clobbers around TLS calls on Aarch64 SVE
@ 2018-07-26  9:14 Alan Hayward
  2018-07-26  9:14 ` [PATCH v2 1/7] Add CLOBBER_HIGH expression Alan Hayward
                   ` (7 more replies)
  0 siblings, 8 replies; 18+ messages in thread
From: Alan Hayward @ 2018-07-26  9:14 UTC (permalink / raw)
  To: gcc-patches; +Cc: nd, Alan Hayward

This is rebasing of the patch posted in November.
It's aim is to support aarch64 SVE register preservation around TLS calls
by adding a CLOBBER_HIGH expression.

Across a TLS call, Aarch64 SVE does not explicitly preserve the
SVE vector registers. However, the Neon vector registers are preserved.
Due to overlapping of registers, this means the lower 128bits of all
SVE vector registers will be preserved.

The existing GCC code assume all Neon and SVE registers are clobbered
across TLS calls.

This patch introduces a CLOBBER_HIGH expression. This behaves a bit like
a CLOBBER expression. CLOBBER_HIGH can only refer to a single register.
The mode of the expression indicates the size of the lower bits which
will be preserved. If the register contains a value bigger than this
mode then the code will treat the register as clobbered, otherwise the
register remains untouched.

The means in order to evaluate if a clobber high is relevant, we need to
ensure the mode of the existing value in a register is tracked.

The first two patches introduce CLOBBER_HIGH and generation support.
The next patch adds a helper function for easily determining if a register
gets clobbered by a CLOBBER_HIGH.
The next three patches add clobber high checks to all of the passes. I
couldn't think of a better way of splitting this up (maybe needs dividing
into smaller patches?).
Finally the last patch adds the CLOBBER_HIGHS around a TLS call for
aarch64 SVE and some test cases.

Alan Hayward (7):
  Add CLOBBER_HIGH expression
  Generation support for CLOBBER_HIGH
  Add func to check if register is clobbered by clobber_high
  lra support for clobber_high
  cse support for clobber_high
  Remaining support for clobber high
  Enable clobber high for tls descs on Aarch64

 gcc/alias.c                                        |  11 ++
 gcc/cfgexpand.c                                    |   1 +
 gcc/combine-stack-adj.c                            |   1 +
 gcc/combine.c                                      |  38 ++++-
 gcc/config/aarch64/aarch64.md                      |  69 ++++++--
 gcc/cse.c                                          | 187 ++++++++++++++-------
 gcc/cselib.c                                       |  42 +++--
 gcc/cselib.h                                       |   2 +-
 gcc/dce.c                                          |  11 +-
 gcc/df-scan.c                                      |   6 +
 gcc/doc/rtl.texi                                   |  15 +-
 gcc/dwarf2out.c                                    |   1 +
 gcc/emit-rtl.c                                     |  16 ++
 gcc/genconfig.c                                    |   1 +
 gcc/genemit.c                                      |  51 +++---
 gcc/genrecog.c                                     |   3 +-
 gcc/haifa-sched.c                                  |   3 +
 gcc/ira-build.c                                    |   5 +
 gcc/ira-costs.c                                    |   7 +
 gcc/ira.c                                          |   6 +-
 gcc/jump.c                                         |   1 +
 gcc/lra-eliminations.c                             |  11 ++
 gcc/lra-int.h                                      |   2 +
 gcc/lra-lives.c                                    |  31 ++--
 gcc/lra.c                                          |  66 +++++---
 gcc/postreload-gcse.c                              |  21 ++-
 gcc/postreload.c                                   |  25 ++-
 gcc/print-rtl.c                                    |   1 +
 gcc/recog.c                                        |   9 +-
 gcc/regcprop.c                                     |  10 +-
 gcc/reginfo.c                                      |   4 +
 gcc/reload1.c                                      |  16 +-
 gcc/reorg.c                                        |  27 ++-
 gcc/resource.c                                     |  24 ++-
 gcc/rtl.c                                          |  15 ++
 gcc/rtl.def                                        |  10 ++
 gcc/rtl.h                                          |  27 ++-
 gcc/rtlanal.c                                      |  47 +++++-
 gcc/sched-deps.c                                   |  15 +-
 .../gcc.target/aarch64/sve_tls_preserve_1.c        |  19 +++
 .../gcc.target/aarch64/sve_tls_preserve_2.c        |  24 +++
 .../gcc.target/aarch64/sve_tls_preserve_3.c        |  24 +++
 42 files changed, 725 insertions(+), 180 deletions(-)
 create mode 100644 gcc/testsuite/gcc.target/aarch64/sve_tls_preserve_1.c
 create mode 100644 gcc/testsuite/gcc.target/aarch64/sve_tls_preserve_2.c
 create mode 100644 gcc/testsuite/gcc.target/aarch64/sve_tls_preserve_3.c

-- 
2.15.2 (Apple Git-101.1)

^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2018-12-13 10:11 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-26  9:14 [PATCH v2 0/7] Support partial clobbers around TLS calls on Aarch64 SVE Alan Hayward
2018-07-26  9:14 ` [PATCH v2 1/7] Add CLOBBER_HIGH expression Alan Hayward
2018-08-04  4:04   ` Jeff Law
2018-07-26  9:14 ` [PATCH v2 2/7] Generation support for CLOBBER_HIGH Alan Hayward
2018-08-04  4:09   ` Jeff Law
2018-07-26  9:14 ` [PATCH v2 4/7] lra support for clobber_high Alan Hayward
2018-08-04  4:21   ` Jeff Law
2018-07-26  9:14 ` [PATCH v2 6/7] Remaining support for clobber high Alan Hayward
2018-08-04  4:30   ` Jeff Law
2018-12-13 10:11   ` Jakub Jelinek
2018-07-26  9:14 ` [PATCH v2 3/7] Add func to check if register is clobbered by clobber_high Alan Hayward
2018-08-04  4:12   ` Jeff Law
2018-07-26  9:14 ` [PATCH v2 7/7] Enable clobber high for tls descs on Aarch64 Alan Hayward
2018-08-04  4:27   ` Jeff Law
2018-08-06 13:15   ` Richard Sandiford
2018-07-26  9:14 ` [PATCH v2 5/7] cse support for clobber_high Alan Hayward
2018-08-04  4:26   ` Jeff Law
2018-08-02 13:01 ` PING [PATCH v2 0/7] Support partial clobbers around TLS calls on Aarch64 SVE Alan Hayward

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).