aboutsummaryrefslogtreecommitdiff
path: root/gcc/value-range.h
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2023-10-25 10:39:49 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2023-10-25 10:39:49 +0100
commit01b42e9880838e9e4f9d8b419104e8a53dc4c782 (patch)
treedfcb16ff098296e431a11eea9b7bbe2f7b47ed3f /gcc/value-range.h
parent7b2ae64b68132c1c643cb34d58cd5eab6f9de652 (diff)
downloadgcc-01b42e9880838e9e4f9d8b419104e8a53dc4c782.zip
gcc-01b42e9880838e9e4f9d8b419104e8a53dc4c782.tar.gz
gcc-01b42e9880838e9e4f9d8b419104e8a53dc4c782.tar.bz2
rtl-ssa: Ensure global registers are live on exit
RTL-SSA mostly relies on DF for block-level register liveness information, including artificial uses and defs at the beginning and end of blocks. But one case was missing. DF does not add artificial uses of global registers to the beginning or end of a block. Instead it marks them as used within every block when computing LR and LIVE problems. For RTL-SSA, global registers behave like memory, which in turn behaves like gimple vops. We need to ensure that they are live on exit so that final definitions do not appear to be unused. Also, the previous live-on-exit handling only considered the exit block itself. It needs to consider non-local gotos as well, since they jump directly to some code in a parent function and so do not have a path to the exit block. gcc/ * rtl-ssa/blocks.cc (function_info::add_artificial_accesses): Force global registers to be live on exit. Handle any block with zero successors like an exit block.
Diffstat (limited to 'gcc/value-range.h')
0 files changed, 0 insertions, 0 deletions