[00/11] aarch64: Add new load/store pair fusion pass

Message ID ZS7yZze0PNITMWn+@arm.com
Headers
Series aarch64: Add new load/store pair fusion pass |

Message

Alex Coplan Oct. 17, 2023, 8:45 p.m. UTC
  Hi,

This patch series adds a new aarch64-specific RTL-SSA pass for forming load and
store pairs (LDPs and STPS).  See the cover letter on patch 11/11 for more
details on the pass itself.

Patch 1/11 fixes a latent bug in RTL-SSA.  Patches 2-5 add features to RTL-SSA
that are needed by the pass.  Patch 6/11 fixes a latent bug in haifa-sched.cc
that is exposed by the pass.  Patches 7-9 adjust the aarch64 testsuite to
account for the new codegen.  Patch 10/11 extends the TFmode load/store pattern
to TImode and TDmode.  Finally, patch 11/11 adds the new pass.

Bootstrapped/regtested as a series on aarch64-linux-gnu, OK for trunk?

Thanks,
Alex

Alex Coplan (11):
  rtl-ssa: Fix bug in function_info::add_insn_after
  rtl-ssa: Add drop_memory_access helper
  rtl-ssa: Add entry point to allow re-parenting uses
  rtl-ssa: Support inferring uses of mem in change_insns
  rtl-ssa: Support for inserting new insns
  haifa-sched: Allow for NOTE_INSN_DELETED at start of epilogue
  aarch64, testsuite: Prevent stp in lr_free_1.c
  aarch64, testsuite: Tweak sve/pcs/args_9.c to allow stps
  aarch64, testsuite: Fix up pr71727.c
  aarch64: Generalise TFmode load/store pair patterns
  aarch64: Add new load/store pair fusion pass.

 gcc/config.gcc                                |    4 +-
 gcc/config/aarch64/aarch64-ldp-fusion.cc      | 2378 +++++++++++++++++
 gcc/config/aarch64/aarch64-passes.def         |    2 +
 gcc/config/aarch64/aarch64-protos.h           |    1 +
 gcc/config/aarch64/aarch64.md                 |   22 +-
 gcc/config/aarch64/aarch64.opt                |   20 +
 gcc/config/aarch64/iterators.md               |    3 +
 gcc/config/aarch64/t-aarch64                  |    7 +
 gcc/haifa-sched.cc                            |   11 +
 gcc/rtl-ssa/access-utils.h                    |   11 +
 gcc/rtl-ssa/accesses.cc                       |   18 +
 gcc/rtl-ssa/accesses.h                        |    4 +
 gcc/rtl-ssa/changes.cc                        |  104 +-
 gcc/rtl-ssa/changes.h                         |    2 +
 gcc/rtl-ssa/functions.h                       |   19 +-
 gcc/rtl-ssa/insns.cc                          |   19 +-
 gcc/rtl-ssa/insns.h                           |    7 +-
 gcc/rtl-ssa/internals.inl                     |    1 +
 gcc/rtl-ssa/member-fns.inl                    |   12 +
 gcc/rtl-ssa/movement.h                        |    8 +-
 gcc/testsuite/gcc.target/aarch64/lr_free_1.c  |    2 +-
 gcc/testsuite/gcc.target/aarch64/pr71727.c    |    2 +-
 .../gcc.target/aarch64/sve/pcs/args_9.c       |    4 +-
 23 files changed, 2623 insertions(+), 38 deletions(-)
 create mode 100644 gcc/config/aarch64/aarch64-ldp-fusion.cc