aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgrtl.cc
diff options
context:
space:
mode:
authorRichard Biener <rguenther@suse.de>2022-05-11 13:34:37 +0200
committerRichard Biener <rguenther@suse.de>2022-05-11 14:34:30 +0200
commit37a8220fa9188470c677abfef50c1b120c0b6c76 (patch)
treeff09f026cd21161c7ae90ad9c00b88fe6c0c47c4 /gcc/cfgrtl.cc
parent7f04b0d786e13ff5c1bd952a24fd324224415c9a (diff)
downloadgcc-37a8220fa9188470c677abfef50c1b120c0b6c76.zip
gcc-37a8220fa9188470c677abfef50c1b120c0b6c76.tar.gz
gcc-37a8220fa9188470c677abfef50c1b120c0b6c76.tar.bz2
rtl-optimization/105559 - avoid quadratic behavior in delete_insn_and_edges
When the insn to delete is a debug insn there's no point in figuring out whether it might be the last real insn and thus we have to purge dead edges. 2022-05-11 Richard Biener <rguenther@suse.de> PR rtl-optimization/105559 * cfgrtl.cc (delete_insn_and_edges): Only perform search to BB_END for non-debug insns.
Diffstat (limited to 'gcc/cfgrtl.cc')
-rw-r--r--gcc/cfgrtl.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/cfgrtl.cc b/gcc/cfgrtl.cc
index 74ea14e..06be46d 100644
--- a/gcc/cfgrtl.cc
+++ b/gcc/cfgrtl.cc
@@ -235,7 +235,7 @@ delete_insn_and_edges (rtx_insn *insn)
{
bool purge = false;
- if (INSN_P (insn) && BLOCK_FOR_INSN (insn))
+ if (NONDEBUG_INSN_P (insn) && BLOCK_FOR_INSN (insn))
{
basic_block bb = BLOCK_FOR_INSN (insn);
if (BB_END (bb) == insn)