aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2022-10-07 12:14:30 +0200
committerEric Botcazou <ebotcazou@adacore.com>2022-10-07 12:16:36 +0200
commit7b8a77eba5efbc6d9556f026774fa1447675602c (patch)
treeaebdd1d8d5bc7e843deaa3ac80f5543984623fbf /gcc/function.cc
parentffaf244c442c575aadbe1c947e22f791a6f14c96 (diff)
downloadgcc-7b8a77eba5efbc6d9556f026774fa1447675602c.zip
gcc-7b8a77eba5efbc6d9556f026774fa1447675602c.tar.gz
gcc-7b8a77eba5efbc6d9556f026774fa1447675602c.tar.bz2
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.
Diffstat (limited to 'gcc/function.cc')
-rw-r--r--gcc/function.cc13
1 files changed, 9 insertions, 4 deletions
diff --git a/gcc/function.cc b/gcc/function.cc
index 5498a71..6474a66 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