diff options
author | Alex Coplan <alex.coplan@arm.com> | 2023-09-16 09:23:52 +0100 |
---|---|---|
committer | Alex Coplan <alex.coplan@arm.com> | 2023-11-24 10:57:51 +0000 |
commit | a49befbd2c783e751dc2110b544fe540eb7e33eb (patch) | |
tree | 40f8c2ce0f164a247811413dd1019a89e17b9b68 /gcc/vmsdbg.h | |
parent | eebcad0ac22010fc59de9d856bb02017fccab282 (diff) | |
download | gcc-a49befbd2c783e751dc2110b544fe540eb7e33eb.zip gcc-a49befbd2c783e751dc2110b544fe540eb7e33eb.tar.gz gcc-a49befbd2c783e751dc2110b544fe540eb7e33eb.tar.bz2 |
rtl-ssa: Support for inserting new insns
The upcoming aarch64 load pair pass needs to form store pairs, and can
re-order stores over loads when alias analysis determines this is safe.
In the case that both mem defs have uses in the RTL-SSA IR, and both
stores require re-ordering over their uses, we represent that as
(tentative) deletion of the original store insns and creation of a new
insn, to prevent requiring repeated re-parenting of uses during the
pass. We then update all mem uses that require re-parenting in one go
at the end of the pass.
To support this, RTL-SSA needs to handle inserting new insns (rather
than just changing existing ones), so this patch adds support for that.
New insns (and new accesses) are temporaries, allocated above a temporary
obstack_watermark, such that the user can easily back out of a change without
awkward bookkeeping.
gcc/ChangeLog:
* rtl-ssa/accesses.cc (function_info::create_set): New.
* rtl-ssa/accesses.h (access_info::is_temporary): New.
* rtl-ssa/changes.cc (move_insn): Handle new (temporary) insns.
(function_info::finalize_new_accesses): Handle new/temporary
user-created accesses.
(function_info::apply_changes_to_insn): Ensure m_is_temp flag
on new insns gets cleared.
(function_info::change_insns): Handle new/temporary insns.
(function_info::create_insn): New.
* rtl-ssa/changes.h (class insn_change): Make function_info a
friend class.
* rtl-ssa/functions.h (function_info): Declare new entry points:
create_set, create_insn. Declare new change_alloc helper.
* rtl-ssa/insns.cc (insn_info::print_full): Identify temporary insns in
dump.
* rtl-ssa/insns.h (insn_info): Add new m_is_temp flag and accompanying
is_temporary accessor.
* rtl-ssa/internals.inl (insn_info::insn_info): Initialize m_is_temp to
false.
* rtl-ssa/member-fns.inl (function_info::change_alloc): New.
* rtl-ssa/movement.h (restrict_movement_for_defs_ignoring): Add
handling for temporary defs.
Diffstat (limited to 'gcc/vmsdbg.h')
0 files changed, 0 insertions, 0 deletions