aboutsummaryrefslogtreecommitdiffstats
path: root/lib/hipe
AgeCommit message (Collapse)Author
2016-06-15hipe: Pattern matching compilation of binaries and bistringsKostis Sagonas
The Core Erlang pattern matching compiler was written long ago, at a time when binaries and bistrings did not really exist in Erlang. This patch, taken from the code of CutEr where it's used for more than a year now, extends the transformation for pattern matching compilation to also include binaries and bistrings. Some code that was found erroneous and causes errors when compiling the transformed code to native code was also taken out while at it. Thanks to @aggelgian for most of the changes in the code.
2016-06-10Merge branch 'hasse/dialyzer/improve_from_form/OTP-13547'Hans Bolinder
* hasse/dialyzer/improve_from_form/OTP-13547: Update primary bootstrap stdlib: Correct types and specs dialyzer: Minor adjustments dialyzer: Suppress unmatched_return for send/2 dialyzer: Improve the translation of forms to types dialyzer: Use a cache when translating forms to types dialyzer: Prepare erl_types:t_from_form() for a cache dialyzer: Optimize erl_types:t_form_form() dialyzer: Correct types syntax_tools: Correct types erts: Correct character repr in doc of the abstract format stdlib: Correct types and specs
2016-06-09Remove support for '...' in Maps typesHans Bolinder
It is possible that '...' is added later (OTP 20.0), but for now we are not sure of all details.
2016-06-09dialyzer: Improve the translation of forms to typesHans Bolinder
Spend less of the limited resources on recursive types.
2016-06-09dialyzer: Use a cache when translating forms to typesHans Bolinder
2016-06-09dialyzer: Prepare erl_types:t_from_form() for a cacheHans Bolinder
No change of functionality.
2016-06-09dialyzer: Optimize erl_types:t_form_form()Hans Bolinder
When the translation from forms to types exceeds some limit, it is faster to try small depths first.
2016-06-09dialyzer: Correct typesHans Bolinder
2016-06-02Revert "Prepare release"Erlang/OTP
This reverts commit e020f75c10410a6943cd055bfa072a2641eab7da.
2016-06-02Prepare releaseErlang/OTP
2016-05-31Code rewrites to avoid exported vars warningsKostis Sagonas
2016-05-31Code rewrites to avoid exported vars compiler warningsKostis Sagonas
2016-05-31Define, export and use a hipe_icode:params() typeKostis Sagonas
2016-05-31Fix name of compiler option and the related warningsKostis Sagonas
2016-05-31Cleanups in hipe/main and hipe/rtlKostis Sagonas
* Rewrite matching statements in ?when_option macro to form that silences dialyzer's unmatched_return warnings * Treat compiler warnings as errors when compiling files in main
2016-05-31Eliminate stupid if constructKostis Sagonas
2016-05-31Use type name, not record notation, in specsKostis Sagonas
2016-05-31Various cleanups and simplificationsKostis Sagonas
2016-05-31Add missing type declarations to a recordKostis Sagonas
2016-05-31Make a type opaqueKostis Sagonas
2016-05-31Cosmetic cleanupsKostis Sagonas
2016-05-31Add compiler option -Werror to MakefilesKostis Sagonas
and correct the name of another, erroneously spelt, option in the process.
2016-05-31Merge branch 'sverker/dialyzer/erlang-halt'Sverker Eriksson
2016-05-30Merge branch 'margnus1/llvm-upgrades/PR-1070'Sverker Eriksson
2016-05-30Reintroduce erlang:halt/0/1 in erl_bif_types.erlSverker Eriksson
Removed in f9cb80861f169743 when changed impl from C to Erlang. But seems they are needed to keep dialyzer tests happy. Also improved bif_SUITE:shadow_comments to include all exported in module erlang, not just the "snifs". ...which detected that apply/2 was missing Shadowed comment as well.
2016-05-27Merge branch 'richcarl/erts/fix-init-stop/PR-911/OTP-13630/OTP-13631'Sverker Eriksson
2016-05-26hipe_llvm: Export hipe literals as LLVM metadataMagnus Lång
LLVM currently hard-codes these. Since it is desirable to be able to change things like PCB layout without requiring a change to LLVM, we export these as LLVM metadata, which can easily be used from LLVM to make it independent of them.
2016-05-26Merge branch 'margnus1/llvm-compatibility/PR-1057/OTP-13626'Sverker Eriksson
2016-05-26Merge branch 'margnus1/hipe/maps-is_key-opts/PR-1069/OTP-13625'Björn-Egil Dahlberg
* margnus1/hipe/maps-is_key-opts/PR-1069/OTP-13625: hipe: Add test suite for verifying optimisations Added elimination of maps:is_key/2 calls to HiPE
2016-05-25hipe: Add halt/2 to functions that always failSverker Eriksson
Seems like halt/2 should be a member of this club.
2016-05-25erts: Implement halt/0 and halt/1 in ErlangSverker Eriksson
just to make things simpler.
2016-05-23hipe: Add test suite for verifying optimisationsErik Norgren
* Added a suite opt_verify_SUITE.erl to HiPE that tests for the results of optimisations, with a single testcase that checks that the icode_call_elim optimisation pass does remove calls to maps:is_key/2 where sound and not otherwise. * Made hipe_testsuite_driver only create explicitly listed suites.
2016-05-23Added elimination of maps:is_key/2 calls to HiPEMagnus Lång
* Implemented removal of maps:is_key/2 calls of which the result is known in a new pass during the typed phase, called hipe_icode_call_elim. * Added the option icode_call_elim that enables the hipe_icode_call_elim pass, and made it default for o2.
2016-05-18hipe_llvm: Move elf_format.hrl types to moduleMagnus Lång
Named types, except those for the records in the header files, have been moved from elf*_format.hrl to elf_format.erl. Also: * Use lists instead of element/2-indexed tuples for ELF section and symbol tables. * Enable +warn_export_vars for hipe/llvm/ subdirectory and fix warning. * Extract duplicated code in hipe_llvm module into help function pp_dereference_type/3.
2016-05-16Merge branch 'kostis/dialyzer/opaque_type/OTP-13586/PR-1047'Hans Bolinder
* kostis/dialyzer/opaque_type/OTP-13586/PR-1047: Declare the erl_types:var_table() type as opaque
2016-05-12Revert "Prepare release"Erlang/OTP
This reverts commit bd64ad8e15d66e48b36dbe3584315dd5cfc8b59a.
2016-05-11hipe_llvm: Disable floats for x86Magnus Lång
A bug in LLVM miscompiles x86 functions that have floats are spilled to stack. We work around it by disabling (inlined) floats when using llvm on x86. Once a LLVM version in which the bug is fixed is released, we can make the workaround conditional depending on the version.
2016-05-11Prepare releaseErlang/OTP
2016-05-11hipe_llvm: Allow LLVM-generated constantsMagnus Lång
Since 3.7, LLVM sometimes generates SSE constants in a special constant section with the requisite alignment (".rodata.cst16"). This broke hipe_llvm since it assumed that all constants that were linked from the text section were constants generated by hipe_llvm. As this is the first time alignments larger than 8 have been required, some small changes were required to hipe_consttab and hipe_bifs:alloc_data/2. Note that hipe_bifs:alloc_data/2 still assumes that erl_alloc will provide the requisite alignment.
2016-05-11hipe: Extract some records into elf_format.hrlMagnus Lång
This allows for much more robust interpretation of relocations, symbols and sections in hipe_llvm_main, without the clunkiness of an abstract interface between two internal modules that belong to the same subsystem anyway.
2016-05-10hipe: Restructure elf_format moduleMagnus Lång
2016-05-09hipe: Cleanup elf_format moduleMagnus Lång
2016-05-09hipe: Remove runtime elf_format class switchingMagnus Lång
The elf_format module was written in such a way that some of the customisation to ELF-32 vs ELF-64 was made at compile-time and some of it at run-time. As such it was not actually possible to read 32-bit files with a module compiled for 64-bit support, or vice versa. As the run-time selection uses some process dictionary ugliness, it was removed, shifting all the customisation to be compile-time.
2016-05-09Merge branch 'kostis/hipe/add-bs_match-tests/PR-1044/OTP-13549'Björn-Egil Dahlberg
* kostis/hipe/add-bs_match-tests/PR-1044/OTP-13549: Up the limit for the timetrap used in the HiPE testsuite One more test suite for binary pattern matching
2016-05-04Declare the erl_types:var_table() type as opaqueKostis Sagonas
and do the following changes: in erl_types: export the type and an appropriate constructor for it in dialyzer_contracts: perform all necessary code modifications to fix all dialyzer warnings Although no warnings are reported by dialyzer, it's quite possible that these are not the only places where the opacity of the var_table() data structure is violated. But I decided to leave these places for a better version of dialyzer to discover...
2016-05-04hipe_llvm: Syntax compatibility with 3.7-3.8Magnus Lång
2016-05-04Up the limit for the timetrap used in the HiPE testsuiteKostis Sagonas
Without this change, one test (bs_utf) times out when run on some very slow SUN/SPARC machine we still have around. Unfortunately, this is the only such machine that we have access to these days. Perhaps suprisingly, all the HiPE tests pass on SPARC, which is nice to know that this backend still works, despite not having been tested for more than one (almost two?) years now.
2016-05-04hipe: Use maps for unification and substitutionHans Bolinder
2016-05-04dialyzer: Use maps instead of dictHans Bolinder
Optimization: A few dictionaries are maps instead of dicts.
2016-05-03One more test suite for binary pattern matchingKostis Sagonas
Taken from the OTP test suites and changed accordingly for HiPE. Used to be problematic in the tests that matched against a segment of 'bad_size'. This was corrected in the BEAM compiler for OTP 19.