aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe/icode
AgeCommit message (Collapse)Author
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-04-11Merge branch 'ks/hipe-cleanup-escaping/OTP-11031' into maintFredrik Gustafsson
* ks/hipe-cleanup-escaping/OTP-11031: Loosen the assumptions of code that handles escaping functions
2013-03-12Loosen the assumptions of code that handles escaping functionsKostis Sagonas
The HiPE compiler implicitly relied on the assumption that a function will never appear as both exported and also used as function closure. This was true because the BEAM compiler prior to R16B created module local anonymous functions for each closure. A proposed change to the BEAM compiler invalidates this invariant, so in order to accommodate for this change there needs to be a change of how the set of possibly escaping functions is computed. While doing this, the code was simplified by taking out a boolean() tag that indicated whether a function is a closure or exported and also slightly cleaned up the affected modules.
2013-03-10Take out 'constant' type test and unnecessary type declarationKostis Sagonas
2013-03-10Take out 'constant' type test from left over commentsKostis Sagonas
2013-03-10Enable more warningsKostis Sagonas
2013-03-10Use remote type instead of relying on hipe_icode.hrlKostis Sagonas
2013-02-25Fix bug related to the handling of is_number/1 by the range analysisKostis Sagonas
The following module produced erroneous results when compiled with HiPE: -module(a). -export([foo/1]). foo(X) when is_number(X) -> is_integer(X). Running: 1> c(a). 2> a:foo(0). true 3> hipe:c(a). 4> a:foo(0). false % *** WRONG *** The problem was that the 'number' case for the `hipe_icode:type_test/1` was going to the default case where the argument was determined as being something other than an integer. Thanks to Sebastian Egner and Johannes Weißl for bringing the bug into attention. Fixed on the day it was reported.
2013-01-09Prepare OTP files for Unicode as default encodingHans Bolinder
2012-08-31Merge branch 'maint'Björn-Egil Dahlberg
Conflicts: lib/diameter/autoconf/vxworks/sed.general xcomp/README.md
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-08-28Merge branch 'maint'Fredrik Gustafsson
2012-08-24Changes in comments and minor code cleanupsKostis Sagonas
2012-08-24Fix a typo and strengthen some type declarationsKostis Sagonas
2012-08-24Remove unused importsKostis Sagonas
2012-06-08Merge branch 'maint'Lukas Larsson
* maint: Update to work with space in include path Update to work with whitespace in exec path
2012-06-05Update to work with whitespace in exec pathLukas Larsson
OTP-10106 OTP-10107
2012-03-30Merge branch 'maint'Björn-Egil Dahlberg
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-02-28Merge branch 'maint'Patrik Nyblom
2012-02-28Make hipe hipe-compiled w/ --enable-native-libsPatrik Nyblom
2012-02-09hipe,erts: Debug support for native call traceSverker Eriksson
2012-01-26HiPE: Remove support for is_constant/1Björn Gustavsson
2012-01-05hipe: Remove warnings of missing types in recordsBjörn-Egil Dahlberg
2011-12-09Update copyright yearsBjörn-Egil Dahlberg
2011-11-30Fix Dialyzer's warnings in HiPEStavros Aronis
2011-11-28hipe: Remove single function compilationBjörn Gustavsson
Compiling single functions (as opposed to whole modules) to native code complicates code management in HiPE. It would also vastly complicate whole-module optimizations, such as returning multiple return values instead of tuples within a module. As a first step, remove the external interface for the single compilation feature. In the future, there are many things that could be restructured and simplified.
2011-11-10Remove exec bit from: erl, hrl, xml, html, asn, gif, xpmRicardo Catalinas Jiménez
2011-09-20Merge branch 'dev' into majorHenrik Nord
Conflicts: erts/aclocal.m4 erts/include/internal/ethread_header_config.h.in
2011-09-05Fix bug with binary pattern matching of floats of variable sizePaul Guyot
Pattern matching of floats with variable size (<<F:S/float>>) did always fail. Judging from similar code for ints, this bug is simply a typo.
2011-08-16Include location information for line instructions in BEAM filesBjörn Gustavsson
2011-08-16compiler, emulator: Introduce the line/1 instructionBjörn Gustavsson
Introduce the line/1 instruction in the compiler and the BEAM virtual machine. It will not yet be generated by the compiler and will not actually carry any information.
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-04Merge branch 'ks/hipe-icode-range-fix' into devNiclas Axelsson
* ks/hipe-icode-range-fix: Cleanup specs Fix bug in the simplification of inexact comparisons Various cleanups and cosmetic changes OTP-9101
2011-02-14Cleanup specsKostis Sagonas
2011-02-14Fix bug in the simplification of inexact comparisonsKostis Sagonas
On 31/1/2011 Paul Guyot reported a bug in the native code compilation of inexact equality/inequality tests between floats and integers. The relevant test was: f(X) -> Y = X / 2, Y == 0. and hipe erroneously evaluated the calls f(0) and f(0.0) to 'false'. The culprit was in the simplification code of the Icode range analysis which used an erroneous test (lists:any/1 instead of lists:all/1).
2011-02-14Various cleanups and cosmetic changesKostis Sagonas
2011-02-03Fix translation of bs_add's fail labelsKostis Sagonas
2011-01-06Fix erroneous fail info of a hipe_bs_primopKostis Sagonas
2010-11-22hipe: Update types and specsKostis Sagonas
2010-10-20hipe: Add translation of BIFs with arity threeKostis Sagonas
2010-09-24Cleanup and small fixes in hipe filesKostis Sagonas
2010-09-15hipe: Do not auto-import min/2 and max/2Tuncer Ayaz
Resolve name clash with auto-imported BIFs min/2 and max/2.
2010-08-30fix crash in hipe_icode_exceptionsMikael Pettersson
This fixes a problem in the HiPE compiler's BEAM-to-Icode pass where it can crash due to the BEAM compiler's merging of identical basic blocks with different exception handling contexts. This bug has been latent, but is now exposed by what appears to be more aggressive optimizations in BEAM. The added comment explains things in more detail.
2010-05-20Remove stray support for the put_literal/2 instructionBjörn Gustavsson
put_literal/2 was an experimental instruction added in R11 to support literals, but before the R12 release support for literals was implemented for all instruction, making the put_literal/2 instruction redundant. Although the beam_disasm module supports dissambley of instructions in older releases, there is no reason to have it support experimental instructions.
2010-05-20Remove stray support for the bs_bits_to_bytes2/2 instructionBjörn Gustavsson
bs_bits_to_bytes2/2 was an experimental instruction added in R11, but was removed in R12. Although the beam_disasm and beam_validator modules do support instructions in older releases, there is no reason to have them support experimental instructions.
2010-05-12hipe_beam_to_icode: Correct names of new recv_* instructionsKostis Sagonas
The bug was introduced in d60f055697cfe8e7f94be4d291d49bb00a66bc52.
2010-05-12Merge branch 'bg/opt-receive' into devErlang/OTP
* bg/opt-receive: Test that gen_server:call/2,3 are fast even with a huge message queue erts: Add tests for the receive optimization Update primary bootstrap erts: Implement recv_mark/1 and recv_set/1 for real compiler tests: Cover the error handling code in beam_receive compiler test: Test optimization of receive statements Optimize selective receives in the presence of a large message queue Introduce the new recv_mark/1 and recv_mark/1 instructions Compile tests that communicate with R12 nodes with the r12 option Move p_run/2 to test_lib gen: Inline wait_resp_mon/2 to help the compiler optimize OTP-8623 bg/opt-receive reveive statements that can only read out a newly created reference are now specially optimized so that it will execute in constant time regardless of the number of messages in the receive queue for the process. That optimization will benefit calls to gen_server:call(). (See gen:do_call/4 for an example of a receive statement that will be optimized.)
2010-05-11hipe_icode: Suppress a dialyzer warningKostis Sagonas
2010-05-11Introduce the new recv_mark/1 and recv_mark/1 instructionsBjörn Gustavsson
Make the recv_mark/1 and recv_mark/1 instructions known to the compiler and run-time system. For the moment, make the loader ignore any occurrences of those instructions in BEAM files. Also update hipe_beam_to_icode to ignore those instructions.