aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2021-04-29 17:24:57 +0100
committerRichard Sandiford <richard.sandiford@arm.com>2021-04-29 17:24:57 +0100
commitc97351c0cf4872cc0e99e73ed17fb16659fd38b3 (patch)
tree452b0e0a1354649f1b17d57fe9cc830cd4a47f57 /gcc/cp/class.c
parent449d7b40f6f6be8d7f9aa7232c73b0371f0963bf (diff)
downloadgcc-c97351c0cf4872cc0e99e73ed17fb16659fd38b3.zip
gcc-c97351c0cf4872cc0e99e73ed17fb16659fd38b3.tar.gz
gcc-c97351c0cf4872cc0e99e73ed17fb16659fd38b3.tar.bz2
rtl-ssa: Fix -fcompare-debug failure [PR100303]
This patch fixes an oversight in the handling of debug instructions in rtl-ssa. At the moment (and whether this is a good idea or not remains to be seen), we maintain a linear RPO sequence of definitions and non-debug uses. If a register is defined more than once, we use a degenerate phi to reestablish a previous definition where necessary. However, debug instructions shouldn't of course affect codegen, so we can't create a new definition just for them. In those situations we instead hang the debug use off the real definition (meaning that debug uses do not follow a linear order wrt definitions). Again, it remains to be seen whether that's a good idea. The problem in the PR was that we weren't taking this into account when increasing (or potentially increasing) the live range of an existing definition. We'd create the phi even if it would only be used by debug instructions. The patch goes for the simple but inelegant approach of passing a bool to say whether the use is a debug use or not. I imagine this area will need some tweaking based on experience in future. gcc/ PR rtl-optimization/100303 * rtl-ssa/accesses.cc (function_info::make_use_available): Take a boolean that indicates whether the use will only be used in debug instructions. Treat it in the same way that existing cross-EBB debug references would be handled if so. (function_info::make_uses_available): Likewise. * rtl-ssa/functions.h (function_info::make_uses_available): Update prototype accordingly. (function_info::make_uses_available): Likewise. * fwprop.c (try_fwprop_subst): Update call accordingly.
Diffstat (limited to 'gcc/cp/class.c')
0 files changed, 0 insertions, 0 deletions