aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe
AgeCommit message (Collapse)Author
2017-11-20Merge branch 'lukas/stdlib/maps_iterators/OTP-14012'Lukas Larsson
* lukas/stdlib/maps_iterators/OTP-14012: erts: Limit size of first iterator for hashmaps Update primary bootstrap Update preloaded modules erts: Remove erts_internal:maps_to_list/2 stdlib: Make io_lib and io_lib_pretty use maps iterator erts: Implement batching maps:iterator erts: Implement maps path iterator erts: Implement map iterator using a stack stdlib: Introduce maps iterator API Conflicts: bootstrap/lib/stdlib/ebin/io_lib.beam bootstrap/lib/stdlib/ebin/io_lib_pretty.beam erts/emulator/beam/bif.tab erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam erts/preloaded/ebin/zlib.beam
2017-11-20erts: Implement batching maps:iteratorLukas Larsson
This iterator implementation fetches multiple elements to iterate over in one call to erts_internal:maps_next instead of one at a time. This means that the memory usage will go up for the iterator as we are buffering elements, but the usage is still bounded. In this implementation the max memory usage is 1000 words. Using this approach makes the iterator as fast as using maps:to_list, so maps:iterator/2 has been removed.
2017-11-15Merge PR-1621 from margnus1/hipe-literal-tagSverker Eriksson
HiPE: Support for literal tag, tests and bugfixes
2017-11-09Merge branch 'maint'Sverker Eriksson
2017-11-09Merge PR-1618 from sverker/sverker/hipe-doc-limitations OTP-14767Sverker Eriksson
Document HiPE limitations
2017-11-06Clearify call trace limitations.Sverker Eriksson
2017-11-05HiPE: Support literal tagsMagnus Lång
Literal tags are used by the VM as an alternative to reserving a large virtual memory space in order to be able to quickly identify which terms are literals. The use of literal tags harms performance, but is useful to support systems where allocating a large amount of virtual memory is not an option.
2017-11-05HiPE: Verify GC safety of derived valuesMagnus Lång
HiPE has had metadata for gc safety on it's temporaries for a while, but it has never been enforced or even checked, so naturally several gc-safety violations has slipped through. A new pass, hipe_rtl_verify_gcsafe verifies gcsafety on optimised RTL and is used when running the testsuite, and can be manually enabled with +{hipe,[verify_gcsafe]}.
2017-11-05HiPE: Make is_divisible a primopMagnus Lång
Since gcunsafe values are live over is_divisible calls (although only the happy path, which never GCd), it should be a primop so there cannot be any GCs.
2017-11-05hipe_rtl_lcm: Fix another bugMagnus Lång
During deletion, the killing of expressions was not considered.
2017-11-05hipe_rtl_lcm: Fix Lazy Code Motion bugMagnus Lång
The lazy code motion optimisation pass could violate its guarantees eliminating partial redundancy by moving an expression to before a call instruction.
2017-11-03Removed "unused list comprehensions"Sverker Eriksson
which don't seem to be true.
2017-11-03Merge branch 'maint'Sverker Eriksson
2017-11-03Merge PR-1607 from sverker/hipe_bin_utf32_bug OTP-14740Sverker Eriksson
Fix hipe bug in binary <<X/utf32>> construction
2017-11-03Fix bug in hipe for <<X/utf32>>Sverker Eriksson
by introducing new primop 'is_unicode' with no exception (ab)use and no GC. Replaces bs_validate_unicode which is kept for backward compat for now.
2017-11-02hipe: Add doc sections about limitationsSverker Eriksson
2017-10-13Merge pull request #1596 from bjorng/bjorn/enhance-try-catchBjörn Gustavsson
(Slightly) optimize catch and try/catch OTP-14683
2017-10-11Optimize try/catch that ignores the return valueBjörn Gustavsson
If a try/catch is used to ignore the potential exception caused by some expression with a side effect such as: try side_effect() catch _Class:_Reason -> ok end, . . . the generated code will be wasteful: try YReg TryLabel %% call side_effect() here try_end Yreg jump GoodLabel TryLabel: try_case YReg %% try_case has set up registers as follows: %% x(0) -> error | exit | throw %% x(1) -> reason %% x(2) -> raw stack trace data GoodLabel: %% This code does not use any x registers. There will be two code paths that both end up at GoodLabel, and the try_case instruction will set up registers that are never used. We can do better by replacing try_case with try_end to obtain this code: try YReg TryLabel %% call side_effect() here try_end Yreg jump GoodLabel TryLabel: try_end YReg GoodLabel: The jump optimizer (beam_jump) can further optimize this code like this: try YReg TryLabel %% call side_effect() here TryLabel: try_end YReg
2017-10-11hipe: Extend the basic_SUITE with one more testKostis Sagonas
that checks the construction of exception information. The test is taken from the compiler SUITE but part of it (the one that constructs exceptions which differ between BEAM and HiPE) is commented out. Related to the discussion of #1596.
2017-10-10Merge branch 'maint'Lars Thorsen
2017-10-10Merge branch 'lars/doc-cleanup/OTP-14475' into maintLars Thorsen
* lars/doc-cleanup/OTP-14475: [edoc] Remove unused module otpsgml_layout.erl Remove unused files from the documentation build
2017-09-28Remove unused files from the documentation buildLars Thorsen
2017-09-26Merge branch 'maint'Henrik Nord
2017-09-22Update release notesErlang/OTP
2017-09-22Update version numbersErlang/OTP
2017-09-20Merge branch 'maint'Dan Gudmundsson
* maint: erts, stdlib: Fix xmllint warning Update runtime deps to depend on new stdlib functionality
2017-09-19Update runtime deps to depend on new stdlib functionalityDan Gudmundsson
~tw and new string functions are new since OTP-20 (stdlib-3.4)
2017-09-18Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Adjust a test case dialyzer: Modify handling of singleton map key types Dialyzer: Rewrite one map type invariant Dialyzer: Rewrite some of the docs of map types
2017-09-18Merge branch 'hasse/dialyzer/map_fixes/OTP-14572' into maintHans Bolinder
* hasse/dialyzer/map_fixes/OTP-14572: dialyzer: Adjust a test case dialyzer: Modify handling of singleton map key types Dialyzer: Rewrite one map type invariant Dialyzer: Rewrite some of the docs of map types
2017-09-15Merge branch 'siri/string-new-api'Siri Hansen
* siri/string-new-api: (28 commits) hipe (test): Do not use deprecated functions in string(3) dialyzer (test): Do not use deprecated functions in string(3) eunit (test): Do not use deprecated functions in string(3) system (test): Do not use deprecated functions in string(3) system (test): Do not use deprecated functions in string(3) mnesia (test): Do not use deprecated functions in string(3) Deprecate old string functions observer: Do not use deprecated functions in string(3) common_test: Do not use deprecated functions in string(3) eldap: Do not use deprecated functions in string(3) et: Do not use deprecated functions in string(3) os_mon: Do not use deprecated functions in string(3) debugger: Do not use deprecated functions in string(3) runtime_tools: Do not use deprecated functions in string(3) asn1: Do not use deprecated functions in string(3) compiler: Do not use deprecated functions in string(3) sasl: Do not use deprecated functions in string(3) reltool: Do not use deprecated functions in string(3) kernel: Do not use deprecated functions in string(3) hipe: Do not use deprecated functions in string(3) ... Conflicts: lib/eunit/src/eunit_lib.erl lib/observer/src/crashdump_viewer.erl lib/reltool/src/reltool_target.erl
2017-09-15hipe (test): Do not use deprecated functions in string(3)Dan Gudmundsson
2017-09-15dialyzer: Improve check of unknown typesHans Bolinder
The implementation of OTP-14218 (commit 6d3b38a) has a weakness: only a very limited part of the type form is checked. This is now fixed: types not used by specs are checked equally well as types used by specs. The new function erl_types:t_from_form_check_remote() checks usage of remote types. It does not expand used local types, and has (almost) no limits on depth and size.
2017-09-12dialyzer: Modify handling of singleton map key typesHans Bolinder
The test case loop.erl shows that there is a problem with certain singleton key types. Here the internal representation toggles between #{a | b => ...} and #{a => ..., b => ...} The choice is to turn #{a | b => ...} into #{a => ..., b => ...} early (t_from_form()). The aim is to keep as much info as possible (in pairs). However, including complex singleton keys (tuples, maps) in this scheme is potentially too costly, and a bit complicated. So one more choice is made: let atoms and number (and nothing else) be singleton types, and let complex keys go into the default key.
2017-09-12Dialyzer: Rewrite one map type invariantHans Bolinder
2017-09-05hipe: Improve handling of UnicodeHans Bolinder
2017-07-06hipe: Do not use deprecated functions in string(3)Hans Bolinder
Should probably be left for the HiPE team to fix
2017-07-06hipe: erl_types: Do not use deprecated functions in string(3)Hans Bolinder
2017-06-21Prepare releaseErlang/OTP
2017-06-13hipe: Remove 'undefined' from a record field's typeHans Bolinder
2017-06-13hipe: Remove use of 'catch'Hans Bolinder
Substitute try/catch for an obsoletely used catch. Thanks to Kostis for pointing it out.
2017-06-13hipe: Optimize contract decoration somewhatHans Bolinder
2017-06-13hipe: Correct a typespecHans Bolinder
2017-06-09dialyzer: Improve handling of UnicodeHans Bolinder
2017-05-31Revert "Prepare release"Hans Nilsson
This reverts commit eaf8ca41dfa4850437ad270d3897399c9358ced0.
2017-05-30Prepare releaseErlang/OTP
2017-05-22dialyzer: Warn for bad type variables of parameterized typesHans Bolinder
As of commit 854ee8b (Erlang/OTP 18) warnings about using '_' as type variable in parameterized types have not been output. The code of erl_types:t_var_names() is corrected. The spec is also corrected (thanks to Kostis for pointing out the bug).
2017-05-05Revert "Prepare release"Raimo Niskanen
This reverts commit dc57404252c47520f352834ad9be45ad684f96c9.
2017-05-04Prepare releaseErlang/OTP
2017-05-04Update copyright yearRaimo Niskanen
2017-04-27hipe: Fix unknown typeHans Bolinder
Due to a bug in Dialyzer, unknown types have been introduced.