Initial AMD Zen 5 "Znver5" Support Merged For LLVM/Clang
([AMD] 26 Minutes Ago
Znver5 For LLVM Clang)
- Reference: 0001492185
- News link: https://www.phoronix.com/news/LLVM-Clang-Znver5-Merged
- Source link:
Last week the a href="https://www.phoronix.com/news/AMD-Zen-5-LLVM-Enablement">initial AMD Zen 5 "znver5" enablement for LLVM/Clang was posted by an AMD compiler engineer. That code has since undergone review and merged for LLVM 20 Git and yesterday then back-ported for LLVM 19.
This initial AMD Zen 5 enablement for LLVM/Clang adds the "-march=znver5" support and exposes the new ISA capabilities of AMD Zen 5 processors. However, the tuning itself is still catering to the existing Zen 4 processors. Future AMD patches will work on properly tuning the Znver5 target for Zen 5 processors.
[1]
During the LLVM code review the question of AMD taking so long to submit this LLVM support was questioned, especially with the GCC support for Znver5 coming early in 2024. The response to the tardy AMD Zen 5 support in LLVM was described as:
"We have a dependency in libpfm for llvm which requires legal clearances. In future, we will make sure this gets addressed in advance and will try to upload our patches in sync with GCC patches. Apologies for the inconvenience."
AMD will be working on the tuned support for Zen 5 processors but it may still "take some time" as noted in another code review comment:
"I will upload the rebased code addressing the format errors shortly. Yes PRs will work for tuning changes. I think it will take some time."
The initial AMD Zen 5 support was [2]merged prior to the weekend and now in LLVM 20 Git. This was then back-ported for LLVM 19 via a separate [3]pull to avoid causing an ABI break in LLVM 19.
Hopefully it won't take too much longer before the Znver5 tuning for LLVM/Clang and GCC compilers are complete.
[1] https://www.phoronix.com/image-viewer.php?id=2024&image=amd_ryzen_zen5_tray_lrg
[2] https://github.com/llvm/llvm-project/commit/02e4186d0b3508e79d78b0ec844518b13a3fe9ea
[3] https://github.com/llvm/llvm-project/commit/149a150b50c112e26fc5acbdd58250c44ccd777f
This initial AMD Zen 5 enablement for LLVM/Clang adds the "-march=znver5" support and exposes the new ISA capabilities of AMD Zen 5 processors. However, the tuning itself is still catering to the existing Zen 4 processors. Future AMD patches will work on properly tuning the Znver5 target for Zen 5 processors.
[1]
During the LLVM code review the question of AMD taking so long to submit this LLVM support was questioned, especially with the GCC support for Znver5 coming early in 2024. The response to the tardy AMD Zen 5 support in LLVM was described as:
"We have a dependency in libpfm for llvm which requires legal clearances. In future, we will make sure this gets addressed in advance and will try to upload our patches in sync with GCC patches. Apologies for the inconvenience."
AMD will be working on the tuned support for Zen 5 processors but it may still "take some time" as noted in another code review comment:
"I will upload the rebased code addressing the format errors shortly. Yes PRs will work for tuning changes. I think it will take some time."
The initial AMD Zen 5 support was [2]merged prior to the weekend and now in LLVM 20 Git. This was then back-ported for LLVM 19 via a separate [3]pull to avoid causing an ABI break in LLVM 19.
Hopefully it won't take too much longer before the Znver5 tuning for LLVM/Clang and GCC compilers are complete.
[1] https://www.phoronix.com/image-viewer.php?id=2024&image=amd_ryzen_zen5_tray_lrg
[2] https://github.com/llvm/llvm-project/commit/02e4186d0b3508e79d78b0ec844518b13a3fe9ea
[3] https://github.com/llvm/llvm-project/commit/149a150b50c112e26fc5acbdd58250c44ccd777f
phoronix