diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2023-12-05 09:28:46 +0000 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2023-12-05 09:28:46 +0000 |
commit | e9d2ae6b9816e61a6148040149c63faa83f54702 (patch) | |
tree | 11bc5ccc60085aacb63ff083613fa697ed43ca27 /gcc/tree-pass.h | |
parent | f542df026cd24e604eb40426a83ce072ef34e15a (diff) | |
download | gcc-e9d2ae6b9816e61a6148040149c63faa83f54702.zip gcc-e9d2ae6b9816e61a6148040149c63faa83f54702.tar.gz gcc-e9d2ae6b9816e61a6148040149c63faa83f54702.tar.bz2 |
Allow prologues and epilogues to be inserted later
Arm's SME adds a new processor mode called streaming mode.
This mode enables some new (matrix-oriented) instructions and
disables several existing groups of instructions, such as most
Advanced SIMD vector instructions and a much smaller set of SVE
instructions. It can also change the current vector length.
There are instructions to switch in and out of streaming mode.
However, their effect on the ISA and vector length can't be represented
directly in RTL, so they need to be emitted late in the pass pipeline,
close to md_reorg.
It's sometimes the responsibility of the prologue and epilogue to
switch modes, which means we need to emit the prologue and epilogue
sequences late as well. (This loses shrink-wrapping and scheduling
opportunities, but that's a price worth paying.)
This patch therefore adds a target hook for forcing prologue
and epilogue insertion to happen later in the pipeline.
gcc/
* target.def (use_late_prologue_epilogue): New hook.
* doc/tm.texi.in: Add TARGET_USE_LATE_PROLOGUE_EPILOGUE.
* doc/tm.texi: Regenerate.
* passes.def (pass_late_thread_prologue_and_epilogue): New pass.
* tree-pass.h (make_pass_late_thread_prologue_and_epilogue): Declare.
* function.cc (pass_thread_prologue_and_epilogue::gate): New function.
(pass_data_late_thread_prologue_and_epilogue): New pass variable.
(pass_late_thread_prologue_and_epilogue): New pass class.
(make_pass_late_thread_prologue_and_epilogue): New function.
Diffstat (limited to 'gcc/tree-pass.h')
-rw-r--r-- | gcc/tree-pass.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/tree-pass.h b/gcc/tree-pass.h index 09e6ada..4e89dd1 100644 --- a/gcc/tree-pass.h +++ b/gcc/tree-pass.h @@ -616,6 +616,8 @@ extern rtl_opt_pass *make_pass_gcse2 (gcc::context *ctxt); extern rtl_opt_pass *make_pass_split_after_reload (gcc::context *ctxt); extern rtl_opt_pass *make_pass_thread_prologue_and_epilogue (gcc::context *ctxt); +extern rtl_opt_pass *make_pass_late_thread_prologue_and_epilogue (gcc::context + *ctxt); extern rtl_opt_pass *make_pass_zero_call_used_regs (gcc::context *ctxt); extern rtl_opt_pass *make_pass_stack_adjustments (gcc::context *ctxt); extern rtl_opt_pass *make_pass_sched_fusion (gcc::context *ctxt); |