]> gcc.gnu.org Git - gcc.git/commitdiff
Fix PR rtl-optimization/108274
authorEric Botcazou <ebotcazou@adacore.com>
Fri, 13 Jan 2023 21:05:28 +0000 (22:05 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Fri, 13 Jan 2023 21:15:20 +0000 (22:15 +0100)
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.

gcc/function.cc

index 27ba880368ac3b98a82ffb08b1b2dbe01f807e91..cfc4d2f74afee7c6ea911e722ca6c0a313edb0c6 100644 (file)
@@ -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
     {
This page took 0.06478 seconds and 5 git commands to generate.