LLVM/Clang 10.0 Adds AMD Zen 2 Scheduler Model For Optimized Code Generation
It's too bad that it has taken so many months after AMD Zen 2 based Ryzen and EPYC processors began shipping to see this compiler support in place, but the good news now is that for the upcoming release of LLVM 10.0 is now the Zen 2 scheduler model being added to the "znver2" target.
Going back to before the Zen 2 processors began shipping last summer, in February AMD Znver2 support was added for LLVM Clang 9.0. But like the GCC compiler support at the time, it added new instructions supported by these CPUs but didn't update the scheduler model / cost tables. In July AMD-partner SUSE added Znver2 tuning to GCC including a new scheduler model that was wired up for GCC 10 and back-ported to GCC 9.2.
Now a half-year later and just days ahead of the LLVM 10.0 feature freeze, mainline LLVM 10.0 is seeing the Zen 2 scheduler model added. AMD's Ganesh Gopalasubramanian provided the Znver2/Rome scheduler and it was committed last week. "The patch gives out the details of the znver2 scheduler model. There are few improvements with respect to execution units, latencies and throughput when compared with znver1."
It's a pity that it has taken so long after Zen 2 CPUs began shipping to see this compiler support through, but at least it's here now. LLVM/Clang 10.0 should be released as stable next month while GCC 10 will be releasing in the March~April timeframe once it clears out its high priority bugs. LLVM 10.0 will hopefully make it in time for inclusion in the upcoming Ubuntu 20.04 LTS.
Moving forward hopefully AMD will be more punctual with their Zen 3 "znver3" compiler tuning, which we have yet to see for GCC or LLVM. The compiler targets and software support in general for Linux/open-source has been one of the areas where Intel has excelled very well over the years thanks to their Open-Source Technology Center and sizable open-source development team while AMD has generally been belated in elements of their open-source support. With some Intel generations we've seen their GCC + LLVM support ironed out a year or more in advance, even before their manufacturing rut has led to delays in new microarchitecture launches. With AMD continuing to gain marketshare both on desktops and servers, hopefully we'll see improvements from AMD in this area in 2020 and beyond.
I'll have up some fresh LLVM Clang -march=znver2 comparison benchmarks with EPYC up shortly.
Going back to before the Zen 2 processors began shipping last summer, in February AMD Znver2 support was added for LLVM Clang 9.0. But like the GCC compiler support at the time, it added new instructions supported by these CPUs but didn't update the scheduler model / cost tables. In July AMD-partner SUSE added Znver2 tuning to GCC including a new scheduler model that was wired up for GCC 10 and back-ported to GCC 9.2.
Now a half-year later and just days ahead of the LLVM 10.0 feature freeze, mainline LLVM 10.0 is seeing the Zen 2 scheduler model added. AMD's Ganesh Gopalasubramanian provided the Znver2/Rome scheduler and it was committed last week. "The patch gives out the details of the znver2 scheduler model. There are few improvements with respect to execution units, latencies and throughput when compared with znver1."
It's a pity that it has taken so long after Zen 2 CPUs began shipping to see this compiler support through, but at least it's here now. LLVM/Clang 10.0 should be released as stable next month while GCC 10 will be releasing in the March~April timeframe once it clears out its high priority bugs. LLVM 10.0 will hopefully make it in time for inclusion in the upcoming Ubuntu 20.04 LTS.
Moving forward hopefully AMD will be more punctual with their Zen 3 "znver3" compiler tuning, which we have yet to see for GCC or LLVM. The compiler targets and software support in general for Linux/open-source has been one of the areas where Intel has excelled very well over the years thanks to their Open-Source Technology Center and sizable open-source development team while AMD has generally been belated in elements of their open-source support. With some Intel generations we've seen their GCC + LLVM support ironed out a year or more in advance, even before their manufacturing rut has led to delays in new microarchitecture launches. With AMD continuing to gain marketshare both on desktops and servers, hopefully we'll see improvements from AMD in this area in 2020 and beyond.
I'll have up some fresh LLVM Clang -march=znver2 comparison benchmarks with EPYC up shortly.
5 Comments