Commit Graph

211 Commits

Author SHA1 Message Date
Dan Gohman
76583192a8 Change ZeroOneOrMore::Zero() to TableElementType::Zero. 2018-12-11 15:40:24 -05:00
Dan Gohman
5d7ece3d15 Fix clippy warning namespaces. 2018-12-06 20:50:38 -05:00
Dan Gohman
5adab629f2 Update to the rustfmt in rust 1.31, which is now stable. 2018-12-06 16:15:48 -05:00
Dan Gohman
30654a6a7d Bump version to 0.25.0 2018-11-26 22:31:07 -08:00
Dan Gohman
c17579e7ec Bump version to 0.24.0 2018-11-26 22:18:36 -08:00
Aaron Power
b11646aba3 Fix bit count bug in emit_small_{memcpy, memset, memmove}. 2018-11-20 22:32:52 -06:00
Dan Gohman
14dfc0d1b6 Bump version to 0.23.0. 2018-11-07 16:18:04 -08:00
Dan Gohman
38e8667f97 Adjust whitespace to match the upstream exception text.
This is a whitespace-only change.
2018-11-07 16:07:51 -08:00
Dan Gohman
b476f823d4 Update to target_lexicon 0.2.0. 2018-11-07 16:01:15 -08:00
Dan Gohman
8d7538049c Pass TargetFrontendConfig by value rather than by reference.
Passing it by reference was an artifact of an earlier version of the
TargetFrontendConfig code, but it's no longer needed, as
TargetFrontendConfig is now a Copy type.
2018-11-06 07:03:04 -08:00
Dan Gohman
d4f8eb7453 Introduce a TargetFrontendConfig type. (#570)
* Introduce a `TargetFrontendConfig` type.

`TargetFrontendConfig` is information specific to the target which is
provided to frontends to allow them to produce Cranelift IR for the
target. Currently this includes the pointer size and the default calling
convention.

The default calling convention is now inferred from the target, rather
than being a setting. cranelift-native is now just a provider of target
information, rather than also being a provider of settings, which gives
it a clearer role.

And instead of having cranelift-frontend routines require the whole
`TargetIsa`, just require the `TargetFrontendConfig`, and add a way to
get the `TargetFrontendConfig` from a `Module`.

Fixes #529.
Fixes #555.
2018-11-02 13:51:42 -07:00
Dan Gohman
87e683b1f4 Update no_std support. 2018-10-26 11:23:04 -07:00
Aaron Power
e999c53eaa Provide optimised codegen for small libc calls 2018-10-25 07:33:50 -07:00
Dan Gohman
ed8ecb99df Remove an obsolete comment. 2018-10-23 16:47:29 -07:00
Boris-Chengbiao Zhou
b288c6001a Fix all clippy warnings (#564)
* Fix all clippy warnings

* Revert usage of inclusive ranges

* Remove redundant function argument

* Revert use of unavailable pointer methods

* Introduce ContiguousCaseRange
2018-10-22 21:52:35 -07:00
bjorn3
c2069762ef Declare br_table otherwise ebb as predecessor (#551)
* Declare br_table otherwise ebb as predecessor (fixes #545)
2018-10-09 15:38:16 -07:00
Dan Gohman
17a9631981 Use more Self keywords instead of repeating the type name. 2018-10-05 16:40:50 -07:00
Dan Gohman
1098eafb45 Remove the concept of non-dense jump tables.
WebAssembly doesn't have non-dense jump tables, and higher-level users
are better served by the facilities in lib/frontend/src/switch.rs for
working with non-dense switches.

This eliminates the concept of "absent" jump table entries, which
were represented as "0" in the text format.

Also, jump table contents are now enclosed in `[` and `]`, so that
we can unambiguously display empty jump tables. Previously, empty jump
tables were displayed as if they had a single absent entry.
2018-10-04 12:46:40 -07:00
bjorn3
b2a28d69e6 Add encodings for i8 and i16 copy, spill, fill, ireduce.i8.i16 (#534)
* Add encodings for i8 and i16 copy, spill, fill, ireduce.i8.i16

Also adds legalization for srem, irsub_imm, {u,s}extend.i16.i8

Fixes #477 cc #466

* Legalize popcnt, clz and ctz for i8 and i16

* Fix bug in call_memset
2018-10-03 14:43:59 -07:00
Tyler McMullen
79cea5e18b Implement jump tables (#453)
* Add 'jump_table_entry' and 'indirect_jump' instructions.

* Update CodeSink to keep track of code size. Pretty up clif-util's disassembly output.

* Only disassemble the machine portion of output. Pretty print the read-only data after it.

* Update switch frontend code to use new br_table instruction w/ default.
2018-10-03 10:04:21 -07:00
Benjamin Bouvier
0b3d3ac880 Remove logging levels restrictions (#538)
* Fixes #537: Remove release mode logging levels restrictions;

* Add information about log's logging levels in the README;
2018-10-02 10:45:23 -07:00
Dan Gohman
52aa1d292a Update no_std support in cranelift-frontend. 2018-09-28 14:46:26 -07:00
Muhammad Mominul Huque
d266b1a42d Rename EntityMap to SecondaryMap (#528)
* Rename `EntityMap` to `SecondaryMap`
2018-09-26 12:03:44 -07:00
Dan Gohman
95e904da75 Merge branch 'master' into master 2018-09-25 16:12:26 -07:00
bjorn3
2c53e2102c Add a sparse Switch usable instead of JumpTable to cranelift-frontend (#517)
* Add a sparse Switch usable instead of JumpTable to cranelift-frontend (fixes #438)
2018-09-25 07:34:32 -07:00
Aaron Power
09f2b78b14 Added FunctionBuilder::{call_memcpy, call_memset, call_memmove} 2018-09-23 11:25:39 +01:00
Dan Gohman
ab99720959 Bump version to 0.22.0 2018-09-21 21:39:41 -07:00
Dan Gohman
53a0c6c67f Update to the rustfmt in rust 1.29, which is now stable. 2018-09-13 12:59:25 -07:00
Dan Gohman
f23ea04242 Fix a panic when splitting a critical edge on a jump_table with nulls.
This fixes #505.
2018-09-12 16:59:03 -07:00
Dan Gohman
f6519c87a4 Improve the assertion failure message for sealing a block twice. 2018-09-12 16:58:36 -07:00
Dan Gohman
b4c7451ae5 Bump version to 0.21.1 2018-09-10 10:00:45 -07:00
Dan Gohman
e8878ba504 Bump version to 0.21.0 2018-09-04 22:04:22 -07:00
Dan Gohman
7fa0a38793 Bump version to 0.20.0 2018-08-28 16:37:52 -07:00
Dan Gohman
2c9b7fd73a Add "no-std" category to crates supporting no-std.
And add "wasm" category to cranelift-wasm.
2018-08-22 12:51:54 -07:00
Dan Gohman
37272f5ceb Removed "Variable" parametricity for SSABuilder and related code too. 2018-08-17 12:13:34 -07:00
Dan Gohman
3d89a8645b Fix rustfmt errors. 2018-08-16 15:26:53 -07:00
Denis Merigoux
ce7b72743c Updated doc now that Variable is now longer a type parameter 2018-08-14 15:15:09 -07:00
Denis Merigoux
bed8e33c9d Removed "Variable" parametricity for FunctionBuilder as discussed in PR https://github.com/CraneStation/cranelift/pull/437 2018-08-14 15:15:09 -07:00
Denis Merigoux
b7d2df9307 Rewrote doc with @sunfishcode's comments in mind 2018-08-14 15:15:09 -07:00
Denis Merigoux
73511435d0 Better explanation for how to use FunctionBuilder to deal with variable translation 2018-08-14 15:15:09 -07:00
Dan Gohman
6a07c72867 Bump version to 0.19.0 2018-08-14 12:55:34 -07:00
Grégoire Geis
dbc547091f Verifier now accepts multiple errors (fixes #387). (#452)
* Verifier now accepts multiple errors (fixes #387).
2018-08-14 10:55:10 -07:00
Dan Gohman
cc4bf1c7fb Deny unstable_features in "std" builds. 2018-08-13 12:51:49 -07:00
Dan Gohman
cd02010a78 Bump version to 0.18.1 2018-08-02 20:10:23 -07:00
Dan Gohman
c4a056a7a0 Bump version to 0.18.0 2018-08-02 18:34:22 -07:00
Dan Gohman
cd75176f10 Update to the rustfmt in rust 1.28, which is now stable.
Also, rustfmt's --write-mode=check is now named --check.
2018-08-02 09:55:40 -07:00
Dan Gohman
d6d1e7253d Bump version to 0.17.0 2018-07-23 16:57:51 -07:00
Dan Gohman
6cb03a873d Bump version to 0.17.0-alpha 2018-07-23 16:15:53 -07:00
Benjamin Bouvier
78b04fc8ab Promote the (Block, Inst) tuple into a PredBlock struct; 2018-07-23 15:26:11 -07:00
Dan Gohman
c77df6f6d9 Add a TODO about a potential optimization opportunity. 2018-07-19 11:08:53 -07:00