aboutsummaryrefslogtreecommitdiff
path: root/gcc/rtl-ssa/changes.cc
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2020-12-17 00:15:09 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2020-12-17 00:15:09 +0000
commit04ee46ed1c06cbbffcd8eb0626b4ab6c3a5082d9 (patch)
treee013d7869c88e489c212f733856b114a91375a97 /gcc/rtl-ssa/changes.cc
parenta240ea024dd8533d898c8cd779dedd0747bbbf2e (diff)
downloadgcc-04ee46ed1c06cbbffcd8eb0626b4ab6c3a5082d9.zip
gcc-04ee46ed1c06cbbffcd8eb0626b4ab6c3a5082d9.tar.gz
gcc-04ee46ed1c06cbbffcd8eb0626b4ab6c3a5082d9.tar.bz2
rtlanal: Add some new helper classes
This patch adds some classes for gathering the list of registers and memory that are read and written by an instruction, along with various properties about the accesses. In some ways it's similar to the information that DF collects for registers, but extended to memory. The main reason for using it instead of DF is that it can analyse tentative changes to instructions before they've been committed. The classes also collect general information about the instruction, since it's cheap to do and helps to avoid multiple walks of the same RTL pattern. I've tried to optimise the code quite a bit, since with later patches it becomes relatively performance-sensitive. See the discussion in the comments for the trade-offs involved. I put the declarations in a new rtlanal.h header file since it seemed a bit excessive to put so much new inline stuff in rtl.h. gcc/ * rtlanal.h: New file. (MEM_REGNO): New constant. (rtx_obj_flags): New namespace. (rtx_obj_reference, rtx_properties): New classes. (growing_rtx_properties, vec_rtx_properties_base): Likewise. (vec_rtx_properties): New alias. * rtlanal.c: Include it. (rtx_properties::try_to_add_reg): New function. (rtx_properties::try_to_add_dest): Likewise. (rtx_properties::try_to_add_src): Likewise. (rtx_properties::try_to_add_pattern): Likewise. (rtx_properties::try_to_add_insn): Likewise. (vec_rtx_properties_base::grow): Likewise.
Diffstat (limited to 'gcc/rtl-ssa/changes.cc')
0 files changed, 0 insertions, 0 deletions