[Bug rtl-optimization/114261] [13/14 Regression] Scheduling takes excessive time (97%) since r13-5154-g733a1b777f1

amonakov at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed Mar 13 13:56:16 GMT 2024


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=114261

--- Comment #8 from Alexander Monakov <amonakov at gcc dot gnu.org> ---
If we want to get rid of the compilation time regression sooner rather than
later, I can suggest limiting my change only to functions that call setjmp:

diff --git a/gcc/sched-deps.cc b/gcc/sched-deps.cc
index c23218890f..ae23f55274 100644
--- a/gcc/sched-deps.cc
+++ b/gcc/sched-deps.cc
@@ -3695,7 +3695,7 @@ deps_analyze_insn (class deps_desc *deps, rtx_insn *insn)

       CANT_MOVE (insn) = 1;

-      if (!reload_completed)
+      if (!reload_completed && cfun->calls_setjmp)
        {
          /* Scheduling across calls may increase register pressure by
extending
             live ranges of pseudos over the call.  Worse, in presence of
setjmp


That way we retain the "correctness fix" part of r13-5154-g733a1b777f1 and keep
the previous status quo on normal functions (quadraticness on asms like
demonstrated in comment #5 would also remain).


More information about the Gcc-bugs mailing list