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. OK to commit? FX
0001-core-Support-heap-based-trampolines.patch
Description: Binary data