Yesterday, the LLVM team announced the stable release of LLVM 9; though LLVM 9.0 missed its planned release date, which was 28th August. LLVM 9.0 RC3 was made available earlier this month. With LLVM 9, the RISC-V target is now out of the experimental mode and turned on by default. Other changes include improved support for asm goto in the MIPS target, another assembly-level support added to the Armv8.1-M architecture, new immarg parameter attribute added to the LLVM IR, and more. LLVM 9 also explores many bug fixes, optimizations, and diagnostics improvements. LLVM 9 also presents an experimental support for C++ in Clang 9.
Explaining the reason behind this update, Alex Bradbury, CTO and Co-Founder of the lowRISC said, “As well as being more convenient for end users, this also makes it significantly easier for e.g. Rust/Julia/ Swift and other languages using LLVM for code generation to do so using the system-provided LLVM libraries. This will make life easier for those working on RISC-V ports of Linux distros encountering issues with Rust dependencies.”
LLVM IR: A new immarg parameter attribute is added. It indicates that an intrinsic parameter is required to be a simple constant. The atomicrmw xchg now allows floating point types and supports fadd and fsub.
ARM Backend: A assembly-level support is added for the Armv8.1-M architecture, including the M-Profile Vector Extension (MVE). Another pipeline model to be used for cores is also added to Cortex-M4.
MIPS Target: Improved experimental support for GlobalISel instruction selection framework. New support for .cplocal assembler directive, sge, sgeu, sgt, sgtu pseudo instructions and asm goto constraint.
PowerPC Target: Improved handling of TOC pointer spills for indirect calls and better precision of square root reciprocal estimates.
SystemZ Target: A new support for the arch13 architecture is added. The builtins for the new vector instructions can be enabled using the -mzvector option.
With the stable release of LLVM 9, Clang 9 official release was also made available. The major new feature in Clang 9 is the new addition of experimental support for C++ for OpenCL. Clang 9 also new compiler flags- -ftime-trace and ftime-trace-granularity=N.
The __FILE_NAME__ macro is added as a Clang specific extension and supports all C-family languages. It also provides initial support for asm goto statements for control flow from inline assembly to labels. The main consumers of this construct are the Linux kernel (CONFIG_JUMP_LABEL=y) and glib. Also, with the addition of asm goto support, the mainline Linux kernel for x86_64 is now buildable and bootable with Clang 9.
The release notes also specifies about an issue that could not be fixed before the LLVM 9 release, “PR40547 Clang gets miscompiled by GCC 9.”
An experimental support for C++is added to OpenCL. Clang 9 also brings backward compatibility with OpenCL C v2.0. Other implemented features include:
Users are happy with the LLVM 9 features, especially the support for asm goto.
A user on Hacker News comments, “This is big. Support for asm goto was merged into the mainline earlier this year, but now it’s released [1]. Aside from the obvious implications of this – being able to build the kernel with LLVM – working with eBPF/XDP just got way easier”
Another user says, “The support for asm goto is great for Linux, no longer being dependent on a single compiler for one of the most popular ISAs can only be a good thing for the overall health of the project.”
For the complete list of changes, check out the official LLVM 9 release notes.
Linux 5.3 releases with support for AMD Navi GPUs, Zhaoxin x86 CPUs and power usage improvements
I remember deciding to pursue my first IT certification, the CompTIA A+. I had signed…
Key takeaways The transformer architecture has proved to be revolutionary in outperforming the classical RNN…
Once we learn how to deploy an Ubuntu server, how to manage users, and how…
Key-takeaways: Clean code isn’t just a nice thing to have or a luxury in software projects; it's a necessity. If we…
While developing a web application, or setting dynamic pages and meta tags we need to deal with…
Software architecture is one of the most discussed topics in the software industry today, and…