]> git.ipfire.org Git - thirdparty/gcc.git/commit
middle-end/118801 - excessive redundant DEBUG BEGIN_STMT
authorRichard Biener <rguenther@suse.de>
Mon, 10 Feb 2025 09:23:45 +0000 (10:23 +0100)
committerRichard Biener <rguenth@gcc.gnu.org>
Fri, 7 Mar 2025 08:59:18 +0000 (09:59 +0100)
commite1c49f413c8c892a61612b3b89de0607ff7ba893
tree50bb2b327f48d2ff28420d7e318b78f7a2a6e667
parent888e70b322622528dac17f04738ffa232c6fb82d
middle-end/118801 - excessive redundant DEBUG BEGIN_STMT

The following addresses the fact that we keep an excessive amount of
redundant DEBUG BEGIN_STMTs - in the testcase it sums up to 99.999%
of all stmts, sucking up compile-time in IL walks.  The patch amends
the GIMPLE DCE code that elides redundant DEBUG BIND stmts, also
pruning uninterrupted sequences of DEBUG BEGIN_STMTs, keeping only
the last of each set of DEBUG BEGIN_STMT with unique location.

PR middle-end/118801
* tree-ssa-dce.cc (eliminate_unnecessary_stmts): Prune
sequences of uninterrupted DEBUG BEGIN_STMTs, keeping only
the last of a set with unique location.
gcc/tree-ssa-dce.cc