Show Your Support: This site is primarily supported by advertisements. Ads are what have allowed this site to be maintained on a daily basis for the past 18+ years. We do our best to ensure only clean, relevant ads are shown, when any nasty ads are detected, we work to remove them ASAP. If you would like to view the site without ads while still supporting our work, please consider our ad-free Phoronix Premium.
AMD Zen 3 Tuning Backported To The GCC 10 Compiler
The past few weeks have seen several commits to GCC Git by SUSE's Jan Hubicka for correcting/completing the Znver3 targeting being introduced in GCC 11, which should be out later this month or early next month depending upon how the rest of the cycle plays out.
For those that aren't quick to move to major new versions of the GNU Compiler Collection, the GCC 10 branch saw on Wednesday the Znver3 tuning work back-ported.
On releases/gcc-10 is the initial Zen 3 tuning work as well as fixing for some of the latencies. Separately is also a fix to avoid the compiler crashing on -march=amd stemming as a regression from when the AMD Family 19h support was first added.
This Zen 3 tuning thus will be found in the upcoming GCC 10.3 point release. Granted, most Linux distributions don't move to new GCC point releases so easily mid-stream, so its relevance still a ways out unless you are on a rolling-release distribution, relying on a gcc-snapshot type package or third-party builds, or rolling your own compiler. Ideally moving forward we can see more punctual AMD compiler enablement for both GCC and Clang. Even before this Zen 3 tuning support was published, months prior Intel already began volleying their Alder Lake and Sapphire Rapids compiler patches, which isn't unusual as the company is often contributing their compiler patches one or two years at least prior to the processors shipping in understanding the long and fragile release cycles of these open-source compilers. Thus by the time of Intel launching new CPU models, the default compiler on the major Linux distributions tend to already have mature out-of-the-box support in place, rather than months down the road.
For those not wanting to roll your own GCC compiler build of GCC 10 or 11 for the Znver3 tuning, AMD in March did release their LLVM Clang based AOCC 3.0 compiler optimized for EPYC 7003 series.