LLVM 11.0
releases.llvm.org
releases.llvm.org
One more backend I'd like to see is the Espressif (ESP32 etc.) one. They've trying to upstream the support, but it seems that the lack of reviewers from the part of LLVM is slowing down the process...?
They congregate on matrix and most "remote" companies could probably learn a bit or two about remote development from them.
The progress is covered here[0] somewhat.
What a great idea to use VLA to mean something else than it does for ISO C99.
I am excited for this feature though, naming aside.
Avoid at all cost.
https://releases.llvm.org/11.0.0/docs/ReleaseNotes.html https://releases.llvm.org/11.0.0/tools/clang/docs/ReleaseNot... https://releases.llvm.org/11.0.0/tools/clang/tools/extra/doc... https://releases.llvm.org/11.0.0/tools/flang/docs/ReleaseNot... https://releases.llvm.org/11.0.0/tools/lld/docs/ReleaseNotes... https://releases.llvm.org/11.0.0/tools/polly/docs/ReleaseNot... https://releases.llvm.org/11.0.0/projects/libcxx/docs/Releas...
* The debug information now has a feature which lets your debugger recover the value of an optimized-out value in certain (common) circumstances. I wish gdb and lldb pick on up this quickly and that it doesn't need you to specify anything explicitly.
* If you're doing JITing with LLVM, you can now run your code's static initializations (which apparently you couldn't before? :-O )
* Lots of RISC-V-related work (features, optimization improvements and bug fixes).
* Nothing new for PTX (the CUDA IR which you can use LLVM to generate).
It drives me nuts when I compile code with "-ggdb -gdwarf-4 -O0" and gdb still reports some symbols as "optimized away". I hope the bullet point above refers to this.
(Ninja edit: although tuning for GDB might coax LLVM to emit the pre-standardised form, without DWARF-5).
1) build with "-O0 -ggdb"
2) In a debug session, notice that a variable I want to inspect has supposedly been optimized away. Get extremely frustrated.
3) Rebuild with every debug-friendly flag I can conceive of "-O0 -ggdb -fno-inline -gdwarf-4 -fno-omit-frame-pointer ..."
4) IIRC, step 3 usually (but not always?) addresses the issue.
But long story short, I don't think I've ever pinned down the minimal requirements for avoiding the issue. Usually when I encounter this, I have bigger issues to deal with.
[1]: https://clang.llvm.org/docs/UsersManual.html#controlling-deb...
julia-master with llvm10:
% julia-master --project=. --startup-file=no -e '@time using Plots'
4.028043 seconds (6.51 M allocations: 470.491 MiB, 4.07% gc time, 16.62% compilation time)
llvm11:
% julia-master --project=. --startup-file=no -e '@time using Plots'
3.392166 seconds (5.97 M allocations: 431.075 MiB, 3.46% gc time, 17.22% compilation time)
So it looks promising that the startup + compilation time is improved.[0]: http://docwiki.embarcadero.com/RADStudio/Sydney/en/LLVM-base...
Zig is a general-purpose programming language and toolchain for maintaining robust, optimal, and reusable software. In addition to supporting LLVM as an optional backend, Zig links Clang and LLD to provide an out-of-the-box cross compilation experience, not only for Zig code but for C and C++ code as well. Using a sophisticated caching system, Zig lazily builds from source compiler-rt, mingw-w64, musl, glibc, libcxx, libcxxabi, and libunwind for the selected target - a “batteries included” drop-in for GCC/Clang that works the same on every platform.
https://andrewkelley.me/post/zig-cc-powerful-drop-in-replace...
The thing I really find interesting about Zig is the compile time function evaluation [1] and how it can stand-in for macros, code generation, precomputing values, etc. I think of CTFE as a continuation that comes baked into the binary from an earlier point in time, T-days_ago.
As for this release, I am stoked to see Flang making progress. I am excited about Fortran in the browser.
The interesting thing of note is that Zig is in the process of creating their own backend, but I don't see them dropping LLVM any time soon. An alternate backend is a great way to find bugs in codegen.
[1] https://andrewkelley.me/post/zig-programming-language-blurs-...
D doesn't go the C++ route, the way code like this works is via generating new code (in text) at compile time which the compiler then compiles (duh) and replaces the mixin statement within.
Here's an annotated example of these features in use
Code injection might eventually come later via Microsoft's ongoing research in C++ metaclasses.
"Dynamic Polymorphism with Metaclasses and Code Injection"
C++ has succeeded despite the committee not because of it.
As proven by every failed attempt to replace languages with industry standards, plenty of companies do care about ISO and ECMA language standards.
D is a nice language, but spends too much time focusing on the language and its cool metaprograming capabilities, without focus on the ecosystem.
Slowly Java, C#, C++ will have the features that made D unique, with the plus side of 20 - 40 years of libraries, IDE support and industry certifications.
Second, it puts _less_ pressure on LLVM to have both a low latency version and a highly optimized version. If the LLVM IR could be more of a common format, I think it would provide a medium for tools to compose better. Eventually we will get there, compiler gods willing. I think LLVM should be the place for the massive-engineering-effort optimization passes.
Lastly, it provides for differential testing of both backends, this makes Zig's homegrown one AND LLVM better.
Thanks for sponsoring Zig!
CI still tests GCC and MSVC (except that MSVC of course has been ICE'ing on my project for the last six months), but all the releases are built with clang and my sleep quality has never been better :-)
(Also it seems the version number changed from 11.0.0 to 11.0?)
(yes, we always do that with x.0.0 version numbers)