public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: FX Coudert <fxcoudert@gmail.com>
Cc: gcc-patches@gcc.gnu.org, Iain Sandoe <iains.gcc@gmail.com>,
	maxim.blinov@embecosm.com,  ebotcazou@adacore.com,
	Jeff Law <jeffreyalaw@gmail.com>
Subject: Re: [PATCH] core: Support heap-based trampolines
Date: Mon, 17 Jul 2023 08:31:31 +0200	[thread overview]
Message-ID: <CAFiYyc1-N4yoEAUxoz+KvgWGPs_S_G8Cvme__8g2Lig8EfZcEA@mail.gmail.com> (raw)
In-Reply-To: <BEFDC64A-7127-4F12-B650-73516FB2AFC7@gmail.com>

On Sun, Jul 16, 2023 at 12:39 PM FX Coudert via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Hi,
>
> This is a reworked version (following review) of the patch by Maxim Blinov and Iain Sandoe enabling heap-based trampolines. What has changed since the last version:
>
> - wording changes, preferring to use “heap-based trampolines” rather than “off-stack trampolines”
> - the option triggering generation of these new trampolines is now a binary choice: -ftrampoline-impl=[stack|heap]
> - some adjustments due to changes in the macOS build flags in GCC since last year
>
> Regarding testing, this patch has had excellent exposure on darwin (both x86_64 and aarch64) because it was part of Iain’s branch, distributed by many macOS distros/vendors (including Homebrew) for more than a year, and there was no bug report against the feature or implementation. On x86_64-linux, I have regression-tested it in three different configurations:
> - a default build
> - a build with --enable-heap-trampolines
> - a build with --enable-heap-trampolines and heap trampolines forced by default (forcing HEAP_TRAMPOLINES_INIT = 1)
>
> There are no regressions in any of these settings (apart from an expected missing warning in gcc.dg/Wtrampolines.c).
>
> ----------
>
> From the original review, one question asked (by Jeff Law) was: whether the two linux implementations should be dropped, and the configure time
> selectability as well. Regardless of the answer to the first question, I think we probably want to retain the later, even if only for darwin, as we want to implement this only on recent darwin versions.

Since this affects the ABI of libgcc I think we don't want that part
to be user configurable but rather determined by
some static list of targets that opt-in to this config.

You mention setjmp/longjmp - on darwin and other platforms requiring
non-stack based trampolines
does the system runtime provide means to deal with this issue like an
alternate allocation method
or a way to register cleanup?

Was there ever an attempt to provide a "generic" trampoline driven by
a more complex descriptor?
(well, it could be a bytecode interpreter and the trampoline being
bytecode on the stack?!)

Otherwise I suggest to split the patch into libgcc, generic and target parts.

Thanks,
Richard.

>
> OK to commit?
>
> FX
>
>

  reply	other threads:[~2023-07-17  6:32 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-16 10:38 FX Coudert
2023-07-17  6:31 ` Richard Biener [this message]
2023-07-17  6:43   ` FX Coudert
2023-07-17  6:58     ` Iain Sandoe
2023-07-17  7:16       ` Iain Sandoe
2023-07-19  9:04         ` Martin Uecker
2023-07-19  9:29           ` Iain Sandoe
2023-07-19 10:43             ` Martin Uecker
2023-07-19 14:23               ` Iain Sandoe
2023-07-19 15:18                 ` Martin Uecker
2023-08-05 14:20   ` FX Coudert
2023-08-20  9:43     ` FX Coudert
2023-09-06 15:44     ` FX Coudert
2023-09-14 10:18       ` Richard Biener
2023-09-16 19:10         ` Iain Sandoe

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=CAFiYyc1-N4yoEAUxoz+KvgWGPs_S_G8Cvme__8g2Lig8EfZcEA@mail.gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=ebotcazou@adacore.com \
    --cc=fxcoudert@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=iains.gcc@gmail.com \
    --cc=jeffreyalaw@gmail.com \
    --cc=maxim.blinov@embecosm.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).