LLVM 5.0 Should Offer Better AMD Ryzen Performance

Written by Michael Larabel in LLVM on 14 March 2017 at 11:47 AM EDT. 8 Comments
LLVM
While LLVM 4.0 was just released earlier this week, for the LLVM 5.0 release six months down the road there should be better AMD Ryzen (Zen) performance.

Since January there's been Zen tuning in LLVM Clang with the "znver1" flag, similar to the znver1 tuning in GCC that's been in place since 2015. While LLVM Clang 4.0 has the initial znver1 support, it's incomplete.

In LLVM/Clang 4.0 and currently in SVN/Git master, znver1 is relying upon the btver1 scheduler model. Btver1 is for AMD's Bobcat.

A PhD student has realized he can squeeze better AMD Ryzen performance of generated binaries by LLVM Clang if switching to Haswell's scheduler model rather than btver2, about 5~10% better performance of the generated binaries, but that's still not as ideal as having a proper Zen scheduler model for LLVM Clang.

Dans Dibyendu of AMD India has responded to LLVM's lack of a Zen scheduler model, "Yes we are working on the scheduler and we will upstream by llvm 5.0."

Longtime LLVM developer Hal Finkel also commented that while LLVM is good at being architecture independent, there isn't as much effort around AMD CPUs with their x86 back-end. This sounds due in part due to lack of as much AMD hardware and testers as they have on the Intel side, but they welcome AMD performance bug reports and information to help them optimize for AMD hardware.

LLVM 5.0 won't be released for about six months, but hopefully the scheduler will soon be introduced in mainline LLVM so it will be easier for interested individuals to try out and see how it impacts the AMD Ryzen performance. I'll certainly run some fresh AMD Ryzen compiler benchmarks when the code is updated -- for now see my current Ryzen GCC compiler tuning and GCC vs. Clang Ryzen benchmarks.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com 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 OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week