Age | Commit message (Collapse) | Author |
|
The previous check whether ErLLVM could be enabled and/or tested simply
checked whether a suitable version of the LLVM tool chain was present
in the path. Obviously this is not enough: there should also be a check
that we are running in an architecture on which the ErLLVM compiler
has been ported. Fix the function that provides this functionality and
also rename it in order to more appropriately describe what it does.
In principle, this change introduces a backwards incompatibility as the
function is one of those exported by the `hipe' module, but this
function was not documented and the chances that it has been used
somewhere else that the test suite are pretty low (if not zero).
|
|
|
|
|
|
Some change in the BEAM compiler resulted in the creation of basic
blocks that differed from those previously created by the compiler.
As a result, the lazy code motion pass of RTL crashed when compiling
some of the new code.
Crashes were privately reported by @richcarl.
|
|
The existing test/0 function in erl_types was not being run in the OTP test
suite, and it had not been updated to match the implementation in the
module (maps vs. dict). This commit removes the macros that excluded some
functions, exports the functions now included in the module, and extracts the
test into a new common_test suite, erl_types_SUITE.
|
|
Consider the following function:
function({function,Name,Arity,CLabel,Is0}, Lc0) ->
try
%% Optimize the code for the function.
catch
Class:Error:Stack ->
io:format("Function: ~w/~w\n", [Name,Arity]),
erlang:raise(Class, Error, Stack)
end.
The stacktrace is retrieved, but it is only used in the call
to erlang:raise/3. There is no need to build a stacktrace
in this function. We can avoid the building if we introduce
an instruction called raw_raise/3 that works exactly like
the erlang:raise/3 BIF except that its third argument must
be a raw stacktrace.
|
|
|
|
|
|
|
|
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]}.
|
|
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.
|
|
* 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
|
|
|
|
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.
|
|
HiPE's range analysis would not update the arguments of a callee when
the result of the call was ignored.
Fixes ERL-278.
|
|
Two tests are added, primarily aimed at the range splitters.
* test_float_spills, which exercises the rare case of high floating
point register pressure, including spill slot move coalescing.
* test_infinite_loops, which tests that various infinite loops are
properly compiled and do contain reduction tests (otherwise they
would permanently hog their scheduler and not notice being sent an
exit signal).
|
|
* Omit bounds check in more cases.
A test case that needs this change to omit bounds check is added.
* Improve code generation by reformulating bounds check to decrease
register pressure.
|
|
|
|
|
|
|
|
|
|
|
|
hipe_icode_call_elim could in some cases replace an #icode_call{} with
control flow with a move instruction. This would break the control flow
graph invariants and cause a crash.
|
|
|
|
|
|
Now that x86 is no longer broken with these optimisation levels, we add
them to the test suite to ensure they do not break again.
Bump timeout to 6min since tests are run twice as many times.
The option set of o1 was changed to all optimisations that run fast on
both big and small programs, incurring only a slight compile time
increase compared to the old set, but with a, presumably, significant
improvement to speed of compiled code.
Change o0 register allocator to linear_scan.
|
|
This is required in some really old SPARC machines running Solaris
we still have access to.
|
|
* 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
|
|
* 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.
|
|
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.
|
|
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.
|
|
|
|
|
|
|
|
It was assumed in hipe_icode_fp:filter_map/3 that either all
predecessors would have an up-to-date ("assigned") tagged copy, or none
of them.
This is temporarily false during the fixpoint loop in
basic_floats:test_icode_type_crash_2/0, which exercises the
all_args_equal(Bindings) =:= true branch, that would previously
erroneously end up in the 'false' branch, which is what caused the crash
in that case.
This is likewise only temporarily false during the fixpoint loop in
basic_floats:test_icode_type_crash/0, but that case instead exercises
the 'false' branch, justifying the inclusion of both tests.
|
|
|
|
Since no test suites includede test_server.hrl, there is no need
to have test_server in the include path or code path.
|
|
As a first step to removing the test_server application as
as its own separate application, change the inclusion of
test_server.hrl to an inclusion of ct.hrl and remove the
inclusion of test_server_line.hrl.
|
|
* margnus1/bs_unit_fix:
hipe: Fix signed compares of unsigned sizes
beam: Fix overflow bug in i_bs_add_jId
hipe: Add tests for bad bit syntax float sizes
Add a case testing the handling of guards involving binaries
Add some more binary syntax construction tests
hipe: Guard against enormous numbers in ranges
hipe: Fix constructing huge binaries
hipe: Fix binary constructions failing with badarith
Add missing corner-case to bs_construct_SUITE
hipe: Allow unsigned args in hipe_rtl_arith
hipe: test unit size match in bs_put_binary_all
hipe: test unit size match in bs_append
Fix hipe_rtl_binary_construct:floorlog2/1
OTP-13272
|
|
The code generated by the HiPE compiler for pattern matching with
UTF binaries was such that sometimes THE_NON_VALUE was stored in
the roots followed by the garbage collector. This was not an issue
for the vanilla native code compiler, but was problematic for the
ErLLVM back-end.
Fix the issue by not storing THE_NON_VALUE in the live roots. An
alternative fix would be to change the code of the garbage collector.
With this fix, there are no more (known) failing test cases for the
ErLLVM back-end (at least on x86_64 with LLVM 3.5, which is the
configuation regularly tested). Thanks to @margnus1 for the fix.
|
|
|
|
|
|
|
|
|
|
|
|
- A test for proper handling of negative numbers in binary search
key tables
- A test for HiPE's ICode range analysis
|
|
|
|
|
|
Take out extraneous spaces at the end of lines.
|
|
|