Progress with Julia codegen and LLVM 4.0

Just wondering about the status of Julia 0.6 and codegen to the LLVM 4,0 release today.

A lot of optimizations and more, like one small item out of hundreds, where LLVM 4.0 incorporates features like: “__vectorcall uses more registers for arguments than __fastcall or the default x64 calling convention use. Use __vectorcall to speed functions that pass several floating-point or SIMD vector arguments and perform operations that take advantage of the arguments loaded in registers.”

I’m wondering if prior major LLVM releases made significant gains in performance?


[llvm-announce] LLVM 4.0.0 Release
Hans Wennborg via llvm-announce llvm-announce at lists.llvm.org
Mon Mar 13 09:55:29 PDT 2017

It is my pleasure to announce that LLVM 4 is now available.

Get it here: LLVM Download Page

LLVM is now using a new versioning scheme, increasing the major
version number with each major release. Stable updates to this release
will be versioned 4.0.x, and the next major release, six months from
now, will be version 5.0.0. For more information, see

This release is the result of the community’s work over the past six
months, including: use of profile data in ThinLTO, more aggressive
aggressive dead code elimination, experimental support for coroutines,
experimental AVR target, better GNU ld compatibility and significant
performance improvements in LLD, as well as improved optimizations,
many bug fixes and more.

See the release notes for more details:
http://llvm.org/releases/4.0.0/docs/ReleaseNotes.html
http://llvm.org/releases/4.0.0/tools/clang/docs/ReleaseNotes.html
http://llvm.org/releases/4.0.0/tools/clang/tools/extra/docs/ReleaseNotes.html
http://llvm.org/releases/4.0.0/tools/lld/docs/ReleaseNotes.html

Thanks to everyone who helped with filing, fixing and code reviewing
for release blocking bugs.

Special thanks to the release testers and packagers: Ben Pope,
Bernhard Rosenkränzer, Diana Picus, Dimitry Andric, Mehdi Amini,
Michał Górny, Renato Golin, Simon Dardis, and Sylvestre Ledru. Also
thanks to Zhendong Su and his team whose fuzz testing prevented many
bugs going into the release.

For questions or comments about this release, please contact the
community on the mailing lists. Onwards to LLVM 5!

Cheers,
Hans

AFAICT __vectorcall is a C feature. Such feature already exists in LLVM and we’ve been using it for a long time. The linker getting stablized could be useful though.

In the past few releases, in general there’re both runtime improvements and regressions and always compile time regression. We are already carrying patches for fixes of performance issues that we can identify. We’ll almost certainly upgrade our LLVM version but not before 0.6 release and not without performance regression tests.

3 Likes

Thanks for the clarity on the process and testing before an upgrade (and all the great work on Julia 0.6, btw).

I just found later in the full release notes for LLVM 4 and found where the feature (yes, a C feature) handling was updated/corrected in LLVM, also its original purpose as a feature awhile back:

Existing __vectorcall calling convention support was extended to include correct handling of HVAs. The __vectorcall calling convention was introduced by Microsoft to enhance register usage when passing parameters.

Thx again.