]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Reduce DF computation at -O0
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 7 Oct 2022 10:14:30 +0000 (12:14 +0200)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 7 Oct 2022 10:16:36 +0000 (12:16 +0200)
Even at -O0 there may be a fair amount of DF computation performed when
compiling large units and part of it appears to be useless.

gcc/
* function.cc (thread_prologue_and_epilogue_insns): Update only
entry and exit blocks when not optimizing.  Remove dead statement.

gcc/function.cc

index 5498a712c4a1ed4c213d7a7c4506e1f25556623a..6474a663b30b8d678893684f9511c781a9896688 100644 (file)
@@ -6249,10 +6249,15 @@ thread_prologue_and_epilogue_insns (void)
        }
     }
 
-  /* Threading the prologue and epilogue changes the artificial refs
-     in the entry and exit blocks.  */
-  epilogue_completed = 1;
-  df_update_entry_exit_and_calls ();
+  /* Threading the prologue and epilogue changes the artificial refs in the
+     entry and exit blocks, and may invalidate DF info for tail calls.  */
+  if (optimize)
+    df_update_entry_exit_and_calls ();
+  else
+    {
+      df_update_entry_block_defs ();
+      df_update_exit_block_uses ();
+    }
 }
 
 /* Reposition the prologue-end and epilogue-begin notes after