Age | Commit message (Collapse) | Author |
|
|
|
|
|
Slightly improves performance.
|
|
|
|
Also, remove unused field 'counter' from #state{}.
|
|
|
|
Profiling showed that hipe_sdi spent most of its time in updateParents,
discarding nodes that were already deleted. By introducing a delete
operation to the segment trees, we can pay this cost only once, when
deleting the node from the graph.
Instead of keeping the ranges around, we recompute the range of the node
when we delete it, since this can be done in constant time, without any
memory allocation.
Although segment trees are not designed to be modified once built,
implementing a delete operation turned out to be a simple matter of
repeating insertion, but deleting the index from, instead of consing it
on, the appropriate nodes' values (segment lists).
This optimisation drastically sped up hipe_sdi to the point of no longer
being the bottleneck in the Assembly stage.
|
|
This speeds up parentsOfChild/2 from O(n) to O(lg n + k).
A new module misc/hipe_segment_trees.erl is introduced.
|
|
hipe_icode_bincomp:find_bs_get_integer/3 was quadratic for no good reason. By observing
that NewSuccs and Rest are always disjoint, we can see that the worklist
does not need to be a set. Furthermore, by replacing the ordset Visited
with a map, we reduce complexity to (a very low) O(n lg n).
On cuter_binlib, this change reduced the time for hipe_icode_bincomp
from 60s to .25s. Using a gb_set for Visited gives .5s, and a sets:set
1s.
We apply the same optimisation to hipe_icode_range.
|
|
t_map/3 previously required callers to perform this normalisation, but
as t_from_form/5 would sometimes fail to do so, this requirement is
relaxed.
Bug (ERL-177) reported and shrunk by Luke Imhoff.
|
|
|
|
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.
|
|
* 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
|
|
It is possible that '...' is added later (OTP 20.0), but for now we
are not sure of all details.
|
|
Spend less of the limited resources on recursive types.
|
|
|
|
No change of functionality.
|
|
When the translation from forms to types exceeds some limit, it is
faster to try small depths first.
|
|
|
|
This reverts commit e020f75c10410a6943cd055bfa072a2641eab7da.
|
|
|
|
|
|
|
|
|
|
|
|
* 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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
and correct the name of another, erroneously spelt, option in the process.
|
|
|
|
|
|
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.
|
|
|
|
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.
|
|
|
|
* 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
|
|
Seems like halt/2 should be a member of this club.
|
|
just to make things simpler.
|
|
* 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.
|
|
* 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.
|
|
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.
|
|
* kostis/dialyzer/opaque_type/OTP-13586/PR-1047:
Declare the erl_types:var_table() type as opaque
|
|
This reverts commit bd64ad8e15d66e48b36dbe3584315dd5cfc8b59a.
|
|
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.
|
|
|
|
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.
|