<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/hipe, branch bjorn/contributing</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Update copyright-year</title>
<updated>2016-12-07T12:15:31+00:00</updated>
<author>
<name>Erlang/OTP</name>
<email>otp@erlang.org</email>
</author>
<published>2016-12-07T12:15:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=3eddb0f762de248d3230b38bc9d478bfbc8e7331'/>
<id>3eddb0f762de248d3230b38bc9d478bfbc8e7331</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'margnus1/hipe-call-elim-crash/PR-1253/OTP-13965' into maint</title>
<updated>2016-11-23T15:27:20+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2016-11-23T15:27:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=2ee19c8a5b44a5b4eeb21f1e6ba6ae4236563c6f'/>
<id>2ee19c8a5b44a5b4eeb21f1e6ba6ae4236563c6f</id>
<content type='text'>
* margnus1/hipe-call-elim-crash/PR-1253:
  hipe_icode_call_elim: Fix cf elimination crash
  hipe: Improve error message on internal crashes
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* margnus1/hipe-call-elim-crash/PR-1253:
  hipe_icode_call_elim: Fix cf elimination crash
  hipe: Improve error message on internal crashes
</pre>
</div>
</content>
</entry>
<entry>
<title>dialyzer: Substitute 'opacity' for 'opaqueness'</title>
<updated>2016-11-22T09:31:59+00:00</updated>
<author>
<name>Hans Bolinder</name>
<email>hasse@erlang.org</email>
</author>
<published>2016-11-22T09:20:55+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=a5f88f548c7f1045b5aa9642574167df899c2f3b'/>
<id>a5f88f548c7f1045b5aa9642574167df899c2f3b</id>
<content type='text'>
Suggested by Kostis.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Suggested by Kostis.
</pre>
</div>
</content>
</entry>
<entry>
<title>hipe_icode_call_elim: Fix cf elimination crash</title>
<updated>2016-11-19T15:13:36+00:00</updated>
<author>
<name>Magnus Lång</name>
<email>margnus1@telia.com</email>
</author>
<published>2016-11-19T14:55:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=bb4624af3e5e1a5979c547e70110a923f1c9d503'/>
<id>bb4624af3e5e1a5979c547e70110a923f1c9d503</id>
<content type='text'>
hipe_icode_call_elim could in some cases replace an #icode_call{} with
control flow with a move instruction. This would break the control flow
graph invariants and cause a crash.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
hipe_icode_call_elim could in some cases replace an #icode_call{} with
control flow with a move instruction. This would break the control flow
graph invariants and cause a crash.
</pre>
</div>
</content>
</entry>
<entry>
<title>hipe: Improve error message on internal crashes</title>
<updated>2016-11-19T15:13:36+00:00</updated>
<author>
<name>Magnus Lång</name>
<email>margnus1@telia.com</email>
</author>
<published>2016-11-19T13:26:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=e7250092945c7d15063d7b2f8ab50070b2a30786'/>
<id>e7250092945c7d15063d7b2f8ab50070b2a30786</id>
<content type='text'>
Print the MFA/module being compiled, and pretty-print the backtrace with
lib:format_stacktrace/4.

Additionally, make the error_msg/2 macro in hipe.hrl respect the
HIPE_LOGGING define, since messages produced by this macro just before
runtime shutdown were sometimes lost (since code_server:error_msg/2 is
asynchronous).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Print the MFA/module being compiled, and pretty-print the backtrace with
lib:format_stacktrace/4.

Additionally, make the error_msg/2 macro in hipe.hrl respect the
HIPE_LOGGING define, since messages produced by this macro just before
runtime shutdown were sometimes lost (since code_server:error_msg/2 is
asynchronous).
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'margnus1/hipe_llvm39_bugs/PR-1237/OTP-14027/OTP-14028' into maint</title>
<updated>2016-11-10T13:48:58+00:00</updated>
<author>
<name>Sverker Eriksson</name>
<email>sverker@erlang.org</email>
</author>
<published>2016-11-10T13:48:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=395d2566808801af72e9b699639a6ec241ba4b28'/>
<id>395d2566808801af72e9b699639a6ec241ba4b28</id>
<content type='text'>
* margnus1/hipe_llvm39_bugs/PR-1237:
  hipe_rtl_to_llvm: Constants for bits per byte/word
  hipe_llvm: Work around LLVM 3.9 sdesc bug
  hipe_llvm: Fix incorrect atom alignment assumption
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* margnus1/hipe_llvm39_bugs/PR-1237:
  hipe_rtl_to_llvm: Constants for bits per byte/word
  hipe_llvm: Work around LLVM 3.9 sdesc bug
  hipe_llvm: Fix incorrect atom alignment assumption
</pre>
</div>
</content>
</entry>
<entry>
<title>hipe_rtl_to_llvm: Constants for bits per byte/word</title>
<updated>2016-11-08T22:36:21+00:00</updated>
<author>
<name>Magnus Lång</name>
<email>margnus1@telia.com</email>
</author>
<published>2016-11-08T22:36:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=24d1459d9daf1a8acfae34d32bd3b39fe33cfef8'/>
<id>24d1459d9daf1a8acfae34d32bd3b39fe33cfef8</id>
<content type='text'>
The constant ?WORD_WIDTH is renamed ?BITS_IN_WORD, and a new constant
?BITS_IN_BYTE is introduced.

Additionally, a bug in a currently unused case clause of
llvm_type_from_size/1 is fixed (the size of a word was hardcoded to 64
bits).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The constant ?WORD_WIDTH is renamed ?BITS_IN_WORD, and a new constant
?BITS_IN_BYTE is introduced.

Additionally, a bug in a currently unused case clause of
llvm_type_from_size/1 is fixed (the size of a word was hardcoded to 64
bits).
</pre>
</div>
</content>
</entry>
<entry>
<title>hipe_llvm: Work around LLVM 3.9 sdesc bug</title>
<updated>2016-11-07T17:05:49+00:00</updated>
<author>
<name>Magnus Lång</name>
<email>margnus1@telia.com</email>
</author>
<published>2016-11-07T16:50:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=537ae156bb024978094aa1a4827a0aec83c70459'/>
<id>537ae156bb024978094aa1a4827a0aec83c70459</id>
<content type='text'>
As of LLVM 3.9, the x86-call-frame-opt pass in LLVM's X86 backend causes
the stack descriptors to contain incorrect (or even negative) frame
sizes or root slot offsets.

This might cause LLVM-compiled modules to be rejected during loading
with a badarg exception in hipe_bifs:enter_sdecs/1 (which additionally
prints a "hipe_bifs_enter_sdesc_1: bad sdesc!" message to stderr), or it
might cause corruption or segmentation faults when walking stacks (f.ex.
during GC) containing frames compiled with ErLLVM.

As a workaround, we pass the -no-x86-call-frame-opt flag to llc when
the version is at least 3.9
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
As of LLVM 3.9, the x86-call-frame-opt pass in LLVM's X86 backend causes
the stack descriptors to contain incorrect (or even negative) frame
sizes or root slot offsets.

This might cause LLVM-compiled modules to be rejected during loading
with a badarg exception in hipe_bifs:enter_sdecs/1 (which additionally
prints a "hipe_bifs_enter_sdesc_1: bad sdesc!" message to stderr), or it
might cause corruption or segmentation faults when walking stacks (f.ex.
during GC) containing frames compiled with ErLLVM.

As a workaround, we pass the -no-x86-call-frame-opt flag to llc when
the version is at least 3.9
</pre>
</div>
</content>
</entry>
<entry>
<title>hipe_llvm: Fix incorrect atom alignment assumption</title>
<updated>2016-11-07T17:04:53+00:00</updated>
<author>
<name>Magnus Lång</name>
<email>margnus1@telia.com</email>
</author>
<published>2016-11-07T16:37:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=d5f0e614ab2998a153de569290bf2fca78d88af6'/>
<id>d5f0e614ab2998a153de569290bf2fca78d88af6</id>
<content type='text'>
ErLLVM was declaring atoms in the following manner:

    @atom_ok = external constant i64
    ; Used inside a function like this
    %var = ptrtoint i64* @atom_ok to i64

However, doing so makes LLVM think the `atom_ok` is 8-byte aligned,
since it refers to a i64 value. This resulted in LLVM occasionally
incorrectly optimising away type tests on atoms, causing incorrect
behaviour or even segfaults. One such case is in
bs_match_compiler:coverage_apply/2, in which an is_boxed test on a
literal atom was optimised away, causing the code to try and load the
"header" of an atom. This problem reproduces with LLVM versions 3.7
through 3.9.

By declaring atoms as i8 (byte) constants instead, LLVM no longer makes
these alignment assumptions, and the bug is fixed.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
ErLLVM was declaring atoms in the following manner:

    @atom_ok = external constant i64
    ; Used inside a function like this
    %var = ptrtoint i64* @atom_ok to i64

However, doing so makes LLVM think the `atom_ok` is 8-byte aligned,
since it refers to a i64 value. This resulted in LLVM occasionally
incorrectly optimising away type tests on atoms, causing incorrect
behaviour or even segfaults. One such case is in
bs_match_compiler:coverage_apply/2, in which an is_boxed test on a
literal atom was optimised away, causing the code to try and load the
"header" of an atom. This problem reproduces with LLVM versions 3.7
through 3.9.

By declaring atoms as i8 (byte) constants instead, LLVM no longer makes
these alignment assumptions, and the bug is fixed.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a test case that should now work</title>
<updated>2016-11-03T16:25:09+00:00</updated>
<author>
<name>Kostis Sagonas</name>
<email>kostis@it.uu.se</email>
</author>
<published>2016-11-03T16:25:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=359caeeaf25854ec808b21e32cfc076283c07474'/>
<id>359caeeaf25854ec808b21e32cfc076283c07474</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
