diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2025-08-18 11:12:57 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2025-08-18 11:12:57 +0100 |
commit | 4a56ba8c8ec281ef794a598f64a5707204ca9088 (patch) | |
tree | 0c833a7c1de73185cfee3842176780f96c492b1f /libjava/classpath/lib/java | |
parent | cc54f2f47e63c9d404a44f618cf114ae63e81b40 (diff) | |
download | gcc-4a56ba8c8ec281ef794a598f64a5707204ca9088.zip gcc-4a56ba8c8ec281ef794a598f64a5707204ca9088.tar.gz gcc-4a56ba8c8ec281ef794a598f64a5707204ca9088.tar.bz2 |
gcse: Fix handling of partial clobbers [PR97497]
This patch fixes an internal disagreement in gcse about how to
handle partial clobbers. Like many passes, gcse doesn't track
the modes of live values, so if a call clobbers only part of
a register, the pass has to make conservative assumptions.
As the comment in the patch says, this means:
(1) ignoring partial clobbers when computing liveness and reaching
definitions
(2) treating partial clobbers as full clobbers when computing
availability
DF is mostly concerned with (1), so ignores partial clobbers.
compute_hash_table_work did (2) when calculating kill sets,
but compute_transp didn't do (2) when computing transparency.
This led to a nonsensical situation of a register being in both
the transparency and kill sets.
gcc/
PR rtl-optimization/97497
* function-abi.h (predefined_function_abi::only_partial_reg_clobbers)
(function_abi::only_partial_reg_clobbers): New member functions.
* gcse-common.cc: Include regs.h and function-abi.h.
(compute_transp): Check for partially call-clobbered registers
and treat them as not being transparent in blocks with calls.
Diffstat (limited to 'libjava/classpath/lib/java')
0 files changed, 0 insertions, 0 deletions