From: Eric Botcazou <botcazou@adacore.com>
To: gcc-patches@gcc.gnu.org
Subject: [PATCH] Fix PR rtl-optimization/108274
Date: Fri, 13 Jan 2023 11:49:04 +0100 [thread overview]
Message-ID: <4771224.GXAFRqVoOG@fomalhaut> (raw)
[-- Attachment #1: Type: text/plain, Size: 488 bytes --]
Hi,
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.
Tested on x86-64/Linux, OK for mainline?
2023-01-13 Eric Botcazou <ebotcazou@adacore.com>
PR rtl-optimization/108274
* function.cc (thread_prologue_and_epilogue_insns): Also update the
DF information for calls in a few more cases.
--
Eric Botcazou
[-- Attachment #2: pr108274.diff --]
[-- Type: text/x-patch, Size: 528 bytes --]
diff --git a/gcc/function.cc b/gcc/function.cc
index d975b001ec9..95f47d287c5 100644
--- a/gcc/function.cc
+++ b/gcc/function.cc
@@ -6261,7 +6261,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
{
next reply other threads:[~2023-01-13 10:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-13 10:49 Eric Botcazou [this message]
2023-01-13 12:55 ` Richard Biener
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4771224.GXAFRqVoOG@fomalhaut \
--to=botcazou@adacore.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).