From 0f06be5a06718ce7b670f4ffe9f971a830381757 Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Sat, 27 Jan 2018 07:28:15 +0100 Subject: [PATCH] re PR middle-end/84040 (compilation time of gcc.c-torture/compile/limits-blockid.c is 50x slower) PR middle-end/84040 * sched-deps.c (sched_macro_fuse_insns): Return immediately for debug insns. From-SVN: r257119 --- gcc/ChangeLog | 6 ++++++ gcc/sched-deps.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bcf3ffd079f..f2699e0c0d0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-27 Jakub Jelinek + + PR middle-end/84040 + * sched-deps.c (sched_macro_fuse_insns): Return immediately for + debug insns. + 2018-01-26 Jim Wilson * config/riscv/riscv.h (MAX_FIXED_MODE_SIZE): New. diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c index 3971861e5ef..2d0199d5837 100644 --- a/gcc/sched-deps.c +++ b/gcc/sched-deps.c @@ -2834,10 +2834,16 @@ static void sched_macro_fuse_insns (rtx_insn *insn) { rtx_insn *prev; + /* No target hook would return true for debug insn as any of the + hook operand, and with very large sequences of only debug insns + where on each we call sched_macro_fuse_insns it has quadratic + compile time complexity. */ + if (DEBUG_INSN_P (insn)) + return; prev = prev_nonnote_nondebug_insn (insn); if (!prev) return; - + if (any_condjump_p (insn)) { unsigned int condreg1, condreg2; -- 2.30.2