From: Eric Botcazou Date: Fri, 7 Oct 2022 10:14:30 +0000 (+0200) Subject: Reduce DF computation at -O0 X-Git-Tag: basepoints/gcc-14~4051 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b8a77eba5efbc6d9556f026774fa1447675602c;p=thirdparty%2Fgcc.git 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 --git a/gcc/function.cc b/gcc/function.cc index 5498a712c4a1..6474a663b30b 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