From: Andi Kleen <ak@linux.intel.com>
To: Andrew Pinski <pinskia@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>,
Richard Guenther <richard.guenther@gmail.com>,
Nathan Sidwell <nathan@acm.org>,
josmyers@redhat.com,
Richard Sandiford <richard.sandiford@arm.com>,
Jason Merrill <jason@redhat.com>
Subject: Re: [PATCH v7 2/9] Fix pro_and_epilogue for sibcalls at -O0
Date: Sun, 2 Jun 2024 13:27:18 -0700 [thread overview]
Message-ID: <ZlzVpiFv6kFXA0A3@tassilo> (raw)
In-Reply-To: <CA+=Sn1nvifOx8zuqjX8yODHPG5KyD9LHzdfYLSLOi2ed_kNK3w@mail.gmail.com>
> @@ -6557,7 +6558,7 @@ rest_of_handle_thread_prologue_and_epilogue
> (function *fun)
> {
> /* prepare_shrink_wrap is sensitive to the block structure of the
> control
> flow graph, so clean it up first. */
> - if (optimize)
> + if (cfun->tail_call_marked || optimize)
> cleanup_cfg (0);
>
> /* On some machines, the prologue and epilogue code, or parts
> thereof,
> @@ -6579,7 +6580,7 @@ rest_of_handle_thread_prologue_and_epilogue
> (function *fun)
>
> /* Shrink-wrapping can result in unreachable edges in the epilogue,
> see PR57320. */
> - cleanup_cfg (optimize ? CLEANUP_EXPENSIVE : 0);
> + cleanup_cfg ((cfun->tail_call_marked || optimize) ? CLEANUP_EXPENSIVE
> : 0);
>
> I think this makes -g -O0 with musttail useless. Make sure if you have a
> musttail function call in the ir that it does not change the cfg for -O0
> case which adds extra jumps specifically for debugging.
It looks like the second hunk (CLEANUP_EXPENSIVE) is not actually
needed. I just tested and at least ARM works without it. I will drop it.
But the first one is needed.
Do you still have the concern only with the first? AFAIK without
CLEANUP_EXPENSIVE there will be much less changes to branches.
-Andi
next prev parent reply other threads:[~2024-06-02 20:27 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-02 17:16 Updated musttail patchkit Andi Kleen
2024-06-02 17:16 ` [PATCH v7 1/9] Improve must tail in RTL backend Andi Kleen
2024-06-10 0:55 ` [PING] " Andi Kleen
2024-06-14 13:43 ` [PING^2] " Andi Kleen
2024-06-20 18:13 ` [PING^3] " Andi Kleen
2024-06-02 17:16 ` [PATCH v7 2/9] Fix pro_and_epilogue for sibcalls at -O0 Andi Kleen
2024-06-02 17:30 ` Andrew Pinski
2024-06-02 20:27 ` Andi Kleen [this message]
2024-06-02 17:16 ` [PATCH v7 3/9] Add a musttail generic attribute to the c-attribs table Andi Kleen
2024-06-02 17:16 ` [PATCH v7 4/9] C++: Support clang compatible [[musttail]] (PR83324) Andi Kleen
2024-06-03 14:42 ` Jason Merrill
2024-06-03 15:33 ` Andi Kleen
2024-06-03 15:44 ` Jakub Jelinek
2024-06-03 16:29 ` Jason Merrill
2024-06-03 19:35 ` Andi Kleen
2024-06-03 20:27 ` Jason Merrill
2024-06-04 0:17 ` Andi Kleen
2024-06-02 17:16 ` [PATCH v7 5/9] C: Implement musttail attribute for returns Andi Kleen
2024-06-02 17:16 ` [PATCH v7 6/9] Add tests for C/C++ musttail attributes Andi Kleen
2024-06-03 14:46 ` Jason Merrill
2024-06-02 17:16 ` [PATCH v7 7/9] Enable musttail tail conversion even when not optimizing Andi Kleen
2024-06-02 17:16 ` [PATCH v7 8/9] Give better error messages for musttail Andi Kleen
2024-06-02 17:16 ` [PATCH v7 9/9] Add documentation for musttail attribute Andi Kleen
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=ZlzVpiFv6kFXA0A3@tassilo \
--to=ak@linux.intel.com \
--cc=gcc-patches@gcc.gnu.org \
--cc=jason@redhat.com \
--cc=josmyers@redhat.com \
--cc=nathan@acm.org \
--cc=pinskia@gmail.com \
--cc=richard.guenther@gmail.com \
--cc=richard.sandiford@arm.com \
/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).