public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH 00/12] Tweaks and extensions to the mode-switching pass
@ 2023-11-05 18:45 Richard Sandiford
  2023-11-05 18:46 ` [PATCH 01/12] mode-switching: Tweak the macro/hook documentation Richard Sandiford
                   ` (11 more replies)
  0 siblings, 12 replies; 34+ messages in thread
From: Richard Sandiford @ 2023-11-05 18:45 UTC (permalink / raw)
  To: gcc-patches; +Cc: jlaw

This series of patches extends the mode-switching pass so that it
can be used for AArch64's SME.  I wondered about including a detailed
description of how the SME mode changes work, but it'd probably be
a distraction.  The system is quite complex and target-specific, and
hopefully the details aren't necessary to understand the motivation.

One of the main requirements for one of the mode-switched "entities" is
that the current mode must always be known at compile time.  It would be
too cumbersome to work out the current mode at runtime and make a dynamic
choice about what to do.  The entity therefore wants the usual LCM
placement where possible, but would rather have redundant mode
transitions than transitions from unknown modes.

In many cases, the modified pass seems to generate optimal or near-optimal
mode-switching code, even with these additional requirements.  Tests are
included with the SME work.

Bootstrapped & regression-tested on aarch64-linux-gnu and
x86_64-linux-gnu, although only the latter is useful since
AArch64 doesn't yet use the pass.  Also tested by building crosses
for epiphany-elf, riscv64-elf and sh-linux-gnu, to pick one triplet
per other target that uses mode switching.

OK to install?

Thanks,
Richard

Richard Sandiford (12):
  mode-switching: Tweak the macro/hook documentation
  mode-switching: Add note problem
  mode-switching: Avoid quadractic list operation
  mode-switching: Fix the mode passed to the emit hook
  mode-switching: Simplify recording of transparency
  mode-switching: Tweak entry/exit handling
  mode-switching: Allow targets to set the mode for EH handlers
  mode-switching: Pass set of live registers to the needed hook
  mode-switching: Pass the set of live registers to the after hook
  mode-switching: Use 1-based edge aux fields
  mode-switching: Add a target-configurable confluence operator
  mode-switching: Add a backprop hook

 gcc/config/epiphany/epiphany-protos.h  |   7 +-
 gcc/config/epiphany/epiphany.cc        |   7 +-
 gcc/config/epiphany/mode-switch-use.cc |   2 +-
 gcc/config/i386/i386.cc                |   4 +-
 gcc/config/riscv/riscv.cc              |   4 +-
 gcc/config/sh/sh.cc                    |   9 +-
 gcc/doc/tm.texi                        | 126 ++++--
 gcc/doc/tm.texi.in                     |  32 +-
 gcc/mode-switching.cc                  | 582 +++++++++++++++++++++----
 gcc/target.def                         | 103 ++++-
 10 files changed, 714 insertions(+), 162 deletions(-)

-- 
2.25.1


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

end of thread, other threads:[~2023-11-11 17:29 UTC | newest]

Thread overview: 34+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-05 18:45 [PATCH 00/12] Tweaks and extensions to the mode-switching pass Richard Sandiford
2023-11-05 18:46 ` [PATCH 01/12] mode-switching: Tweak the macro/hook documentation Richard Sandiford
2023-11-07  0:10   ` Jeff Law
2023-11-05 18:46 ` [PATCH 02/12] mode-switching: Add note problem Richard Sandiford
2023-11-07  0:11   ` Jeff Law
2023-11-05 18:47 ` [PATCH 03/12] mode-switching: Avoid quadractic list operation Richard Sandiford
2023-11-07  0:47   ` Jeff Law
2023-11-05 18:47 ` [PATCH 04/12] mode-switching: Fix the mode passed to the emit hook Richard Sandiford
2023-11-07  0:51   ` Jeff Law
2023-11-05 18:47 ` [PATCH 05/12] mode-switching: Simplify recording of transparency Richard Sandiford
2023-11-07  0:52   ` Jeff Law
2023-11-05 18:48 ` [PATCH 06/12] mode-switching: Tweak entry/exit handling Richard Sandiford
2023-11-07  1:01   ` Jeff Law
2023-11-05 18:48 ` [PATCH 07/12] mode-switching: Allow targets to set the mode for EH handlers Richard Sandiford
2023-11-07  1:07   ` Jeff Law
2023-11-08  0:15     ` Richard Sandiford
2023-11-08  2:24       ` Jeff Law
2023-11-05 18:48 ` [PATCH 08/12] mode-switching: Pass set of live registers to the needed hook Richard Sandiford
2023-11-07  1:11   ` Jeff Law
2023-11-05 18:49 ` [PATCH 09/12] mode-switching: Pass the set of live registers to the after hook Richard Sandiford
2023-11-07  1:12   ` Jeff Law
2023-11-05 18:49 ` [PATCH 10/12] mode-switching: Use 1-based edge aux fields Richard Sandiford
2023-11-07  2:53   ` Jeff Law
2023-11-08  0:35     ` Richard Sandiford
2023-11-08  2:22       ` Jeff Law
2023-11-11 15:51         ` Richard Sandiford
2023-11-11 16:19           ` Jeff Law
2023-11-05 18:50 ` [PATCH 11/12] mode-switching: Add a target-configurable confluence operator Richard Sandiford
2023-11-07  3:04   ` Jeff Law
2023-11-11 15:54     ` Richard Sandiford
2023-11-11 16:19       ` Jeff Law
2023-11-11 17:29         ` Richard Sandiford
2023-11-05 18:50 ` [PATCH 12/12] mode-switching: Add a backprop hook Richard Sandiford
2023-11-10  1:18   ` Jeff Law

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