aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.cc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2023-01-13 22:05:28 +0100
committerEric Botcazou <ebotcazou@adacore.com>2023-01-13 22:15:20 +0100
commit4fa6845b4b29f33cc7ea3d8ff49b61bb1f460561 (patch)
treeff9a9dadaf7768d109ea8531e99f6046a5ebbc6b /gcc/function.cc
parent1a460d19ba0939e05b38befb6256f4f4bb416e0d (diff)
downloadgcc-4fa6845b4b29f33cc7ea3d8ff49b61bb1f460561.zip
gcc-4fa6845b4b29f33cc7ea3d8ff49b61bb1f460561.tar.gz
gcc-4fa6845b4b29f33cc7ea3d8ff49b61bb1f460561.tar.bz2
Fix PR rtl-optimization/108274
Unlike other IPA passes, the ICF pass can be run at -O0 and some testcases rely on this in the testsuite. Now it effectively creates a tail call so the DF information needs be updated in this case after epilogue creation. gcc/ PR rtl-optimization/108274 * function.cc (thread_prologue_and_epilogue_insns): Also update the DF information for calls in a few more cases.
Diffstat (limited to 'gcc/function.cc')
-rw-r--r--gcc/function.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/function.cc b/gcc/function.cc
index 27ba880..cfc4d2f 100644
--- a/gcc/function.cc
+++ b/gcc/function.cc
@@ -6266,7 +6266,10 @@ thread_prologue_and_epilogue_insns (void)
/* 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)
+ if (optimize
+ || flag_optimize_sibling_calls
+ || flag_ipa_icf_functions
+ || in_lto_p)
df_update_entry_exit_and_calls ();
else
{