[erlang-questions] hipe - erllvm: finished, quiet, or other?

Kostis Sagonas kostis@REDACTED
Thu Jul 28 08:12:47 CEST 2016

On 07/15/2016 07:09 PM, Felix Gallo wrote:
> Both HiPE and erllvm seem pretty quiet these days; there's commentary
> and work in mainline otp suggesting that erllvm is still under some kind
> of development, but it's been a few years since the main erllvm page has
> been updated, and I'm having difficulty getting a recent llvm to work
> (which is not unusual, given that each llvm release involves breaking
> changes, and they move pretty rapidly).
> Where's the bleeding edge on this?

First of all, just in case you did not know it, note that ErLLVM has 
been fully included in Erlang/OTP for a couple of years now, as an 
alternative backend to the native code compiler.  You can use it simply 
by specifying the compiler option {hipe, [to_llvm]} to the list of 
compiler options of the BEAM compiler.  However, the performance you can 
expect to get is not very much different than that of the vanilla HiPE 
compiler, and given that the compilation times are higher, there is 
probably not very much reason to prefer it over HiPE unless you really 
have some code that the LLVM compiler is good in optimizing.

Both HiPE and ErLLVM are quite stable these days.  There is some 
development still going on, for example there have been many pull 
requests that made it into 19 and some that are still cooking on github, 
but the level of activity is not so high these days.

Since the inclusion of ErLLVM in Erlang/OTP, we have not felt the need 
to update the erllvm page.  Also, unfortunately, we have not really been 
following the development of LLVM and consequently the erllvm compiler 
in Erlang/OTP releases in 18.x and prior do not work with recent LLVM 
versions.  But there has been quite a lot of activity during the first 
half of 2016 and, as far as we know, on x86_84, the ErLLVM code in 19.0 
works OK with all LLVM versions >= 3.5, including the most recent 
one(s).  Please send a report if you have trouble using HiPE on some 
platform or the ErLLVM in 19 on x86_64.  It will be news to us.  (There 
are known issues with ErLLVM on x86, but these are due to bugs of LLVM.)

Anyway, the bottomline is that we are still doing our best to support 
HiPE and ErLLVM by fixing bugs and doing performance improvements as we 
discover them,  But I would classify HiPE and ErLLVM in 19.0 as usable.


PS. Apologies for the slow response; it's vacation time...

More information about the erlang-questions mailing list