[erlang-bugs] Native compilation hangs with rm-reverse-eta-conversion

Anthony Ramine n.oxyde@REDACTED
Wed Jan 23 12:49:04 CET 2013


Hi,

The bytecode invariant that I broke is the fact that a function cannot be used as
a closure and as a normal function both at the same time, thus the eta-abstraction
is needed by HiPE.

Fredrik, for the time being you should probably revert rm-reverse-eta-conversion
because I don't think I'll be able to make HiPE work with the eta-abstraction in
that much time.

Kostis, could you give me directions on how to make HiPE not need the intermediate
closures when doing fun Name/Arity?

Regards,

-- 
Anthony Ramine

Le 21 janv. 2013 à 10:09, Anthony Ramine a écrit :

> Hi Kostis,
> 
> My patch removes the automatic eta-abstraction for function references from the BEAM code generation [1]. The consequence of this is that some fun references labels (the ones which are from exported functions) are now taken from the exports table in beam_dict.
> 
> This makes hipe pass exported functions which are used as fun references to hipe_coordinator both in `Closures` and `Exported`, and that makes everything hang if the exported function contains a fun reference to itself, like in erl_syntax:is_literal/1 [3].
> 
> Could you explain to me what `Escaping` and `NonEscaping` means? More specifically, what the boolean() value in the pairs of `NonEscaping` mean.
> 
> Regards,
> 
> [1] https://github.com/nox/otp/commit/42b87b
> [2] https://github.com/nox/otp/blob/master/lib/hipe/main/hipe.erl#L762-770
> [3] https://github.com/nox/otp/blob/master/lib/syntax_tools/src/erl_syntax.erl#L5909-5929
> 
> -- 
> Anthony Ramine
> 
> Le 20 janv. 2013 à 09:30, Kostis Sagonas a écrit :
> 
>> The following is just a guess, but I suspect that your patch either broke a bytecode invariant that the hipe type analyzer relied on (in which case your code needs to respect this invariant), or generated code which is OK but it's code that had never been tested before (so it's a bug in the analysis of the native code compiler)
> 




More information about the erlang-bugs mailing list