public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug rtl-optimization/113019] New: [NOT A BUG] Multi-architecture binaries for Linux
@ 2023-12-14 11:47 aros at gmx dot com
  2023-12-14 12:23 ` [Bug rtl-optimization/113019] " ktkachov at gcc dot gnu.org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: aros at gmx dot com @ 2023-12-14 11:47 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113019

            Bug ID: 113019
           Summary: [NOT A BUG] Multi-architecture binaries for Linux
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: rtl-optimization
          Assignee: unassigned at gcc dot gnu.org
          Reporter: aros at gmx dot com
  Target Milestone: ---

I know nothing about how libraries/binaries function in Linux or any other OS
however,

Nowadays in Linux there's seemingly a demand [1] [2] for getting more
performance out of applications/libraries by compiling them for newer x86-64
targets, e.g. x86_64_v3 however that instantly excludes a large swathe of CPUs
including very recent Intel CPUs lacking AVX2.

I wonder if GCC is capable of compiling a single library/binary object which
contains distinct code paths for different x86-64 targets. That way you could
have a single binary [object] which has the best performance and compatibility
regardless of where it's run.

I can imagine libraries having offsets for its functions and you cannot have
two offsets for different architectures, but what about 1) having two distinct
functions for different uArchs, e.g. some_routine_x86-64() and
some_routine_x86-64-v3()? or 2) every function having the most basic

if (arch=this)
    {run this}
else
    {run that}.

At the beginning of it?

I apologize if nothing above makes any sense.

https://ubuntu.com/blog/optimising-ubuntu-performance-on-amd64-architecture
https://www.phoronix.com/news/Arch-Linux-ALHP-x86-64-v4

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-12-17 21:32 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-14 11:47 [Bug rtl-optimization/113019] New: [NOT A BUG] Multi-architecture binaries for Linux aros at gmx dot com
2023-12-14 12:23 ` [Bug rtl-optimization/113019] " ktkachov at gcc dot gnu.org
2023-12-14 12:39 ` arsen at gcc dot gnu.org
2023-12-14 14:34 ` ultrafine at gmx dot com
2023-12-14 14:34 ` ultrafine at gmx dot com
2023-12-14 14:53 ` aros at gmx dot com
2023-12-14 16:44 ` [Bug target/113019] " pinskia at gcc dot gnu.org
2023-12-14 16:48 ` pinskia at gcc dot gnu.org
2023-12-17 21:32 ` egallager at gcc dot gnu.org

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).