public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@linux.intel.com>
To: Marek Polacek <polacek@redhat.com>
Cc: gcc-patches@gnu.org
Subject: Re: [PATCH v3 1/5] Improve must tail in RTL backend
Date: Wed, 31 Jan 2024 12:16:59 -0800	[thread overview]
Message-ID: <Zbqqu6ErlW5O7NM6@tassilo> (raw)
In-Reply-To: <ZbqLsW-CJ_8ranTw@redhat.com>

> This results in "error: cannot tail-call: cannot tail-call: other reasons".
> So the second argument should be "other reasons" only.

Yes will fix those. Thanks.

> 
> I notice that if I don't use -O2 I also get "other reasons".  But it should be
> easy-ish to say "cannot tail-call: optimizations not enabled" or so.

It's unfortunately not easy to distinguish. It's not just -O2, but
various missing transformations make tree-tailcall not do it its job,
and they could depend on other flags. But there might be also other
reasons not related to the optimization that makes the tail call fall.
I would be uncomfortable reporting the problem is -O2 when it might 
be something else.

The right fix would be to make tree-tailcall not fail with optimization,
and for the remaining cases add errors there.  But that would
make the patch a lot bigger and it's not clear it would improve usability
that much. So I opted to just mention the problem in the documentation.

-Andi

  reply	other threads:[~2024-01-31 20:17 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-31  2:17 Updated [[musttail]] patchkit Andi Kleen
2024-01-31  2:17 ` [PATCH v3 1/5] Improve must tail in RTL backend Andi Kleen
2024-01-31 18:04   ` Marek Polacek
2024-01-31 20:16     ` Andi Kleen [this message]
2024-01-31 20:27       ` Marek Polacek
2024-01-31  2:17 ` [PATCH v3 2/5] C++: Support clang compatible [[musttail]] (PR83324) Andi Kleen
2024-01-31 19:55   ` Marek Polacek
2024-01-31 20:21     ` Andi Kleen
2024-01-31 20:35       ` Jakub Jelinek
2024-01-31 21:53         ` Joseph Myers
2024-01-31  2:17 ` [PATCH v3 3/5] C: Implement musttail attribute for returns Andi Kleen
2024-01-31  2:17 ` [PATCH v3 4/5] Add tests for C/C++ musttail attributes Andi Kleen
2024-01-31 12:44   ` Prathamesh Kulkarni
2024-01-31 20:11   ` Marek Polacek
2024-02-01  7:39     ` Andi Kleen
2024-02-01 14:03       ` Marek Polacek
2024-02-01 17:33         ` Joseph Myers
2024-01-31  2:17 ` [PATCH v3 5/5] 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=Zbqqu6ErlW5O7NM6@tassilo \
    --to=ak@linux.intel.com \
    --cc=gcc-patches@gnu.org \
    --cc=polacek@redhat.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).