<feed xmlns='http://www.w3.org/2005/Atom'>
<title>otp.git/lib/hipe/icode, branch master</title>
<subtitle>Mirror of Erlang/OTP repository.
</subtitle>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/'/>
<entry>
<title>Merge branch 'maint'</title>
<updated>2019-07-08T07:52:27+00:00</updated>
<author>
<name>John Högberg</name>
<email>john@erlang.org</email>
</author>
<published>2019-07-08T07:52:27+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=a0612f22ba37f8b24a4a6f737cbcefae44d4e6f1'/>
<id>a0612f22ba37f8b24a4a6f737cbcefae44d4e6f1</id>
<content type='text'>
* maint:
  dialyzer: Remove native code compilation
  hipe: Disable compilation on encountering try/catch
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* maint:
  dialyzer: Remove native code compilation
  hipe: Disable compilation on encountering try/catch
</pre>
</div>
</content>
</entry>
<entry>
<title>hipe: Disable compilation on encountering try/catch</title>
<updated>2019-07-05T12:19:38+00:00</updated>
<author>
<name>John Högberg</name>
<email>john@erlang.org</email>
</author>
<published>2019-07-05T11:02:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8831684baddc575b1e8ea0aedfca72636fcc1332'/>
<id>8831684baddc575b1e8ea0aedfca72636fcc1332</id>
<content type='text'>
code_SUITE:upgrade would consistently fail in the HiPE case
because two clauses were mixed up. Disabling it altogether may
seem a bit harsh but we don't have the resources to fix it at the
moment.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
code_SUITE:upgrade would consistently fail in the HiPE case
because two clauses were mixed up. Disabling it altogether may
seem a bit harsh but we don't have the resources to fix it at the
moment.
</pre>
</div>
</content>
</entry>
<entry>
<title>hipe: Use the new index when translating funs</title>
<updated>2019-06-14T10:58:22+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-06-04T04:33:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=8fde098f9d98d227a6609f77419369cb50ad701b'/>
<id>8fde098f9d98d227a6609f77419369cb50ad701b</id>
<content type='text'>
OTP 23 will start using the new index instead of the old index
when comparing funs. Update the translator to icode accordingly.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
OTP 23 will start using the new index instead of the old index
when comparing funs. Update the translator to icode accordingly.
</pre>
</div>
</content>
</entry>
<entry>
<title>Make the swap instruction known to the compiler</title>
<updated>2019-05-22T08:47:22+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-05-14T08:11:31+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=18dc9a8099d1ad8f52b9db7bd251bcbfd632ce5e'/>
<id>18dc9a8099d1ad8f52b9db7bd251bcbfd632ce5e</id>
<content type='text'>
BEAM has had a `swap` instruction for several releases, but it was not
known to the compiler. The loader would translate a sequence of three
`move` instructions to the `swap` instructions, but only when it was
possible to determine that it would be safe.

By making `swap` known to the compiler, it can be applied in more
situations since it is easier for the compiler than for the loader
to ensure that the usage is safe, and the loader shenanigans can be
eliminated.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
BEAM has had a `swap` instruction for several releases, but it was not
known to the compiler. The loader would translate a sequence of three
`move` instructions to the `swap` instructions, but only when it was
possible to determine that it would be safe.

By making `swap` known to the compiler, it can be applied in more
situations since it is easier for the compiler than for the loader
to ensure that the usage is safe, and the loader shenanigans can be
eliminated.
</pre>
</div>
</content>
</entry>
<entry>
<title>HiPE: Don't fail the compilation for unimplemented instructions</title>
<updated>2019-03-20T15:19:30+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2019-03-11T12:15:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=4e0430638635083c199f81375a6c14f2ffb726fb'/>
<id>4e0430638635083c199f81375a6c14f2ffb726fb</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Introduce a put_tuple2 instruction</title>
<updated>2018-09-03T08:47:24+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2018-09-01T08:57:33+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=47a2ff39ac75c69b41f90f05a63fd9a2e6c0b36a'/>
<id>47a2ff39ac75c69b41f90f05a63fd9a2e6c0b36a</id>
<content type='text'>
Sometimes when building a tuple, there is no way to avoid an
extra `move` instruction. Consider this code:

    make_tuple(A) -&gt; {ok,A}.

The corresponding BEAM code looks like this:

    {test_heap,3,1}.
    {put_tuple,2,{x,1}}.
    {put,{atom,ok}}.
    {put,{x,0}}.
    {move,{x,1},{x,0}}.
    return.

To avoid overwriting the source register `{x,0}`, a `move`
instruction is necessary.

The problem doesn't exist when building a list:

    %% build_list(A) -&gt; [A].
    {test_heap,2,1}.
    {put_list,{x,0},nil,{x,0}}.
    return.

Introduce a new `put_tuple2` instruction that builds a tuple in a
single instruction, so that the `move` instruction can be eliminated:

    %% make_tuple(A) -&gt; {ok,A}.
    {test_heap,3,1}.
    {put_tuple2,{x,0},{list,[{atom,ok},{x,0}]}}.
    return.

Note that the BEAM loader already combines `put_tuple` and `put`
instructions into an internal instruction similar to `put_tuple2`.
Therefore the introduction of the new instruction will not speed up
execution of tuple building itself, but it will be less work for
the loader to load the new instruction.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Sometimes when building a tuple, there is no way to avoid an
extra `move` instruction. Consider this code:

    make_tuple(A) -&gt; {ok,A}.

The corresponding BEAM code looks like this:

    {test_heap,3,1}.
    {put_tuple,2,{x,1}}.
    {put,{atom,ok}}.
    {put,{x,0}}.
    {move,{x,1},{x,0}}.
    return.

To avoid overwriting the source register `{x,0}`, a `move`
instruction is necessary.

The problem doesn't exist when building a list:

    %% build_list(A) -&gt; [A].
    {test_heap,2,1}.
    {put_list,{x,0},nil,{x,0}}.
    return.

Introduce a new `put_tuple2` instruction that builds a tuple in a
single instruction, so that the `move` instruction can be eliminated:

    %% make_tuple(A) -&gt; {ok,A}.
    {test_heap,3,1}.
    {put_tuple2,{x,0},{list,[{atom,ok},{x,0}]}}.
    return.

Note that the BEAM loader already combines `put_tuple` and `put`
instructions into an internal instruction similar to `put_tuple2`.
Therefore the introduction of the new instruction will not speed up
execution of tuple building itself, but it will be less work for
the loader to load the new instruction.
</pre>
</div>
</content>
</entry>
<entry>
<title>hipe_beam_to_icode: Correct translation of get_map_elements</title>
<updated>2018-08-17T07:51:00+00:00</updated>
<author>
<name>Björn Gustavsson</name>
<email>bjorn@erlang.org</email>
</author>
<published>2018-08-13T07:53:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=004257f6fc1ea9efea1c99a93211e2f39b1d14ad'/>
<id>004257f6fc1ea9efea1c99a93211e2f39b1d14ad</id>
<content type='text'>
If one of the destination registers for get_map_elements is
the same as the map source, extract that element last.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If one of the destination registers for get_map_elements is
the same as the map source, extract that element last.
</pre>
</div>
</content>
</entry>
<entry>
<title>Change "can not" into "cannot"</title>
<updated>2018-07-27T08:16:17+00:00</updated>
<author>
<name>Raimo Niskanen</name>
<email>raimo@erlang.org</email>
</author>
<published>2018-07-26T12:14:14+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=37c11cda19bd9067a4e094fbde53b276d6ab0d3d'/>
<id>37c11cda19bd9067a4e094fbde53b276d6ab0d3d</id>
<content type='text'>
I did not find any legitimate use of "can not", however skipped
changing e.g RFCs archived in the source tree.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
I did not find any legitimate use of "can not", however skipped
changing e.g RFCs archived in the source tree.
</pre>
</div>
</content>
</entry>
<entry>
<title>Sort entries and correct typos</title>
<updated>2018-02-23T13:41:02+00:00</updated>
<author>
<name>Michał Muskała</name>
<email>michal@muskala.eu</email>
</author>
<published>2018-02-23T13:41:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=b5ff263df0e2dd3fc7795a3e0ec41e254899ad6c'/>
<id>b5ff263df0e2dd3fc7795a3e0ec41e254899ad6c</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Inline more type test BIFs in HiPE</title>
<updated>2018-02-17T10:55:45+00:00</updated>
<author>
<name>Michał Muskała</name>
<email>michal@muskala.eu</email>
</author>
<published>2018-02-17T10:36:25+00:00</published>
<link rel='alternate' type='text/html' href='http://git.ninenines.eu/otp.git/commit/?id=7d1509b7e58cf67f033eda353276315d72370e92'/>
<id>7d1509b7e58cf67f033eda353276315d72370e92</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
