hipe - erllvm: finished, quiet, or other?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

hipe - erllvm: finished, quiet, or other?

Felix Gallo-2
I've been playing around with Pony (http://www.ponylang.org/) recently, and it stirred me to wonder about the current state of numerical performance directly in erlang.  Although there's a convenient safety net in clean and dirty NIFs, it does feel pretty pleasurable to not have to orchestrate the dance of multiple languages and layers in order to go fast.

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?

F.

_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: hipe - erllvm: finished, quiet, or other?

Kostis Sagonas-2
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.

Kostis

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


_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions
Reply | Threaded
Open this post in threaded view
|

Re: hipe - erllvm: finished, quiet, or other?

Felix Gallo-2
Kostis, thanks for taking time from your vacation to answer. :)  I'm glad to hear erllvm is still alive and kicking.  I did have trouble building it on a few platforms with various llvm releases; I'll see if I can repeat and distill the issues when I get a chance.

F.

On Wed, Jul 27, 2016 at 11:12 PM, Kostis Sagonas <[hidden email]> wrote:
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.

Kostis

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




_______________________________________________
erlang-questions mailing list
[hidden email]
http://erlang.org/mailman/listinfo/erlang-questions