]> git.ipfire.org Git - thirdparty/gcc.git/commit
rtl-ssa: Handle call clobbers in more places
authorRichard Sandiford <richard.sandiford@arm.com>
Wed, 25 Oct 2023 09:39:52 +0000 (10:39 +0100)
committerRichard Sandiford <richard.sandiford@arm.com>
Wed, 25 Oct 2023 09:39:52 +0000 (10:39 +0100)
commitcc15a0f49d3c4d37d5177572d4209e907d1503ab
treea5a4dafb8df559807756c0706bbfce60fe81cc57
parentba97d0e3b9660e2499b9f2500a2d837cfb9cc184
rtl-ssa: Handle call clobbers in more places

In order to save (a lot of) memory, RTL-SSA avoids creating
individual clobber records for every call-clobbered register.
It instead maintains a list & splay tree of calls in an EBB,
grouped by ABI.

This patch takes these call clobbers into account in a couple
more routines.  I don't think this will have any effect on
existing users, since it's only necessary for hard registers.

gcc/
* rtl-ssa/access-utils.h (next_call_clobbers): New function.
(is_single_dominating_def, remains_available_on_exit): Replace with...
* rtl-ssa/functions.h (function_info::is_single_dominating_def)
(function_info::remains_available_on_exit): ...these new member
functions.
(function_info::m_clobbered_by_calls): New member variable.
* rtl-ssa/functions.cc (function_info::function_info): Explicitly
initialize m_clobbered_by_calls.
* rtl-ssa/insns.cc (function_info::record_call_clobbers): Update
m_clobbered_by_calls for each call-clobber note.
* rtl-ssa/member-fns.inl (function_info::is_single_dominating_def):
New function.  Check for call clobbers.
* rtl-ssa/accesses.cc (function_info::remains_available_on_exit):
Likewise.
gcc/rtl-ssa/access-utils.h
gcc/rtl-ssa/accesses.cc
gcc/rtl-ssa/functions.cc
gcc/rtl-ssa/functions.h
gcc/rtl-ssa/insns.cc
gcc/rtl-ssa/member-fns.inl