public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-3156] Reduce DF computation at -O0
@ 2022-10-07 10:17 Eric Botcazou
  0 siblings, 0 replies; only message in thread
From: Eric Botcazou @ 2022-10-07 10:17 UTC (permalink / raw)
  To: gcc-cvs

https://gcc.gnu.org/g:7b8a77eba5efbc6d9556f026774fa1447675602c

commit r13-3156-g7b8a77eba5efbc6d9556f026774fa1447675602c
Author: Eric Botcazou <ebotcazou@adacore.com>
Date:   Fri Oct 7 12:14:30 2022 +0200

    Reduce DF computation at -O0
    
    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.

Diff:
---
 gcc/function.cc | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/gcc/function.cc b/gcc/function.cc
index 5498a712c4a..6474a663b30 100644
--- a/gcc/function.cc
+++ b/gcc/function.cc
@@ -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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-10-07 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-07 10:17 [gcc r13-3156] Reduce DF computation at -O0 Eric Botcazou

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).