aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-loop-manip.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2023-03-22 09:29:49 +0100
committerRichard Biener <rguenther@suse.de>2023-04-19 10:28:42 +0200
commit675ac8822b51a39f6a66a44858d7c31ece8700f2 (patch)
tree689f5ae298c28bdcc10d217d45116a257e0a2a57 /gcc/tree-ssa-loop-manip.cc
parent8f81100115f68b37fb2723e987c14a3185d1f47d (diff)
downloadgcc-675ac8822b51a39f6a66a44858d7c31ece8700f2.zip
gcc-675ac8822b51a39f6a66a44858d7c31ece8700f2.tar.gz
gcc-675ac8822b51a39f6a66a44858d7c31ece8700f2.tar.bz2
rtl-optimization/109237 - quadraticness in delete_trivially_dead_insns
The following addresses quadraticness in processing debug insns in delete_trivially_dead_insns and insn_live_p by using TREE_VISITED on the INSN_VAR_LOCATION_DECL to indicate a later debug bind with the same decl and no intervening real insn or debug marker. That gets rid of the NEXT_INSN walk in insn_live_p in favor of first clearing TREE_VISITED in the first loop over insn and the book-keeping of decls we set the bit since we need to clear them when visiting a real or debug marker insn. That improves the time spent in delete_trivially_dead_insns from 10.6s to 2.2s for the testcase. PR rtl-optimization/109237 * cse.cc (insn_live_p): Remove NEXT_INSN walk, instead check TREE_VISITED on INSN_VAR_LOCATION_DECL. (delete_trivially_dead_insns): Maintain TREE_VISITED on active debug bind INSN_VAR_LOCATION_DECL.
Diffstat (limited to 'gcc/tree-ssa-loop-manip.cc')
0 files changed, 0 insertions, 0 deletions