AMD Zen 3 Scheduler Model Finally Added To LLVM/Clang

Written by Michael Larabel in AMD on 3 May 2021 at 07:09 AM EDT. 8 Comments
While last minute AMD Zen 3 "znver3" improvements managed to make it for GCC 11 that was recently released, the recent debut of LLVM 12.0 wasn't so lucky on the Zen 3 support front. There was the very basic enablement that landed in LLVM 12 but now the more complete support isn't expected until LLVM 13 this autumn.

The initial "-march=znver3" support made it into LLVM 12 but the Zen 3 tuned scheduler model hadn't landed even though the initial scheduler model updates were posted for review in January. It was only this weekend that the Zen 3 scheduler model has now landed within LLVM Git for LLVM 13.0 that will debut as stable in September~October or slightly before that if making a LLVM 12.0.1 release with it back-ported.

This Zen 3 scheduler model was built from scratch relying upon LLVM's llvm-mca machine code analyzer for generating realistic instruction costs, etc. The new scheduler model has seen limited testing/benchmarking so far but should help some workloads with RawSpeed being one noted workload so far that this addition has helped.

This commit adds the 14.3k lines of new code providing the current Zen 3 model. It's too bad though that this didn't land months ago in ensuring good out-of-the-box compiler support at launch at least for AMD EPYC 7003 series or ideally even ahead of the Ryzen 5000 series launch last year. Intel for their part added Icelake-Server to GCC and LLVM/Clang back in 2018 and remains well known for their timely open-source enablement well ahead of launch.

LLVM 13.0 should be out in the September or October timeframe (the LLVM 13 release calendar has yet to be published but their second release of the year usually occurs then, depending upon how it plays out with blocker bugs, etc) so we'll see what more AMD optimizations might land still ahead of this next open-source compiler release.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via

Popular News This Week