public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Andrew Carlotti <andrew.carlotti@arm.com>
To: gcc-patches@gcc.gnu.org
Cc: Richard Biener <richard.guenther@gmail.com>
Subject: [PATCH 0/5] Fix fmv mangling for AArch64
Date: Mon, 15 Jan 2024 11:26:05 +0000	[thread overview]
Message-ID: <db8b5080-2f2f-64c9-456e-c8553b16d677@e124511.cambridge.arm.com> (raw)

This patch series should have no functional change besides the mangling of some symbol names on AArch64.

Patch 1/5 adds lots of tests to verify that existing mangling behaviour on x86 and PowerPC is unchanged.

Patch 2/5 extends DECL_FUNCTION_VERSIONED to a 2-bit enum.

Patches 3/5 and 4/5 are trivial refactorings.

Patch 5/5 is the only patch with any functional change, and that should be
minimal.  I've bootstrapped and tested the entire series on both AArch64 and
x86.  I've also run the new x86 and PowerPC tests on a cross-compiler (with a
temporary hack to disable ifunc availability checks) to verify that function
multiversioning still works on those platforms, with the symbol mangling
unchanged.

I'm aware now that we just started of Stage 4, and this isn't actually a
regression, but is this still ok for master?



Some other things I previously tried that I couldn't make work:
- I had hoped to create an explicit target hook for the ifunc symbol name
mangling as well, but it turned out to be rather tricky to replicate the
existing double mangling weirdness for x86 (I didn't work out how to convince
the frontend to apply C++ mangling to the new symbol on-demand without breaking
other things).

- It's also awkward to try to access the base assembler name after applying
function version mangling - this is why I resorted to just reversing the
default version mangling in the AArch64 backend.  I tried delaying function
version mangling until after the resolver was generated, but that led to issues
with duplicate comdat group names from make_decl_one_only.

There may be less hacky solutions or workarounds for these issues, but they
would involve a more substantial refactoring and will have to wait until GCC 15
(or later).

             reply	other threads:[~2024-01-15 11:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-15 11:26 Andrew Carlotti [this message]
2024-01-15 11:26 ` [PATCH 1/5] testsuite: Add tests for fmv symbol presence and mangling Andrew Carlotti
2024-01-15 11:27 ` [PATCH 2/5] tree: Extend DECL_FUNCTION_VERSIONED to an enum Andrew Carlotti
2024-01-15 12:28   ` Richard Biener
2024-01-16  8:21     ` Andrew Carlotti
2024-01-16 10:42       ` [PATCH] aarch64: Fix function multiversioning mangling Andrew Carlotti
2024-01-25 16:49         ` Richard Sandiford
2024-01-15 11:27 ` [PATCH 3/5] Change create_version_clone_with_body parameter name Andrew Carlotti
2024-01-15 11:28 ` [PATCH 4/5] cp: Use get_mangled_id in more places in mangle_decl Andrew Carlotti
2024-01-16 20:24   ` Jason Merrill
2024-01-15 11:28 ` [PATCH 5/5] Add target hook for function version name mangling Andrew Carlotti

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=db8b5080-2f2f-64c9-456e-c8553b16d677@e124511.cambridge.arm.com \
    --to=andrew.carlotti@arm.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=richard.guenther@gmail.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).