Commit Graph

420 Commits

Author SHA1 Message Date
Dan Gohman
16e16c49a7 Bump version to 0.37.0 2019-07-27 04:50:19 -07:00
Nicolas B. Pierron
42ebd2a5f4 Fix licm/jump-table-entry.clif test case to work with basic blocks. 2019-07-25 14:28:07 +02:00
Dan Gohman
4641fdd302 Bump version to 0.36.0 2019-07-19 16:28:40 -07:00
Andrew Brown
084e279def Add x86 implementation of splat instruction 2019-07-16 17:07:44 -07:00
Andrew Brown
3b36a1d1d8 Add x86 implementation of insertlane instruction 2019-07-16 17:07:44 -07:00
Andrew Brown
683e7c75a3 Add x86-specific shuffle instructions
This includes both PSHUFD and PSHUFB; these are necessary to legalize future SIMD instructions.
2019-07-16 17:07:44 -07:00
Andrew Brown
61772e9775 Add raw_bitcast instruction
Casts bits as a different type of the same width with no change to the data (unlike bitcast)
2019-07-16 17:07:44 -07:00
Andrew Brown
5f0e5567c1 Add scalar_to_vector instruction
Moves scalar values in a GPR register to an FPR register
2019-07-16 17:07:44 -07:00
Andrew Brown
f2c48009e8 Disable SIMD features by default 2019-07-16 17:07:44 -07:00
Dan Gohman
67dd0b5015 Bump version to 0.35.0 2019-07-12 15:48:19 -07:00
Nicolas B. Pierron
8edc40cb49 BB-like manual legalization for x86 ISA 2019-07-12 14:20:26 +02:00
Dan Gohman
59f6c81e4f Bump version to 0.34.0 2019-07-09 12:31:58 -07:00
Nicolas B. Pierron
3ac7466cab Legalize br_table to a BB-like format. 2019-07-09 16:48:54 +02:00
Nicolas B. Pierron
1963c223b1 Legalize trapz/trapnz to a BB-like format. 2019-07-09 16:02:49 +02:00
Nicolas B. Pierron
f431465802 Replace newly inserted fallthrough by jump. 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
8bfdfbe68b Use BB-like EBB in filetests/regalloc/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
a1a4b9bfb1 Use BB-like EBB in filetests/verifier/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
8c65ec0dde Use BB-like EBB in filetests/regress/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
3c6ca9049e Use BB-like EBB in filetests/simple_gvn/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
560619f749 Use BB-like EBB in filetests/cfg/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
3970fa2752 Use BB-like EBB in filetests/postopt/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
4316917cb9 Use BB-like EBB in filetests/parser/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
7b36cb58a0 Use BB-like EBB in filetests/isa/x86/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
77eb34e20f Use BB-like EBB in filetests/isa/riscv/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
40eede927b Use BB-like EBB in filetests/domtree/*.clif 2019-07-08 15:17:49 +02:00
Nicolas B. Pierron
44abcbec1e Use BB-like EBB in filetests/licm/*.clif 2019-07-08 15:17:49 +02:00
Dan Gohman
a3e459269e Bump version to 0.33.0 2019-07-03 10:40:58 -07:00
Dan Gohman
b35227b417 Bump version to 0.32.0 2019-07-02 12:27:39 -07:00
Dan Gohman
4b924d34b6 Bump version to 0.31.0 2019-06-28 11:37:39 -07:00
Benjamin Bouvier
83336290c2 Mark the jump_table_entry Instruction as loading; 2019-06-27 17:38:20 +02:00
Benjamin Bouvier
d7d48d5cc6 Add the dyn keyword before trait objects; 2019-06-24 11:42:26 +02:00
julian-seward1
5fb347b7bc Merge pull request #784 from julian-seward1/issue779
Only create copy_nop instructions for types for which an encoding exi…
2019-06-05 15:05:56 +02:00
Julian Seward
b1488decc4 Only create copy_nop instructions for types for which an encoding exists. Issue #779.
PR #773 detects, at reload time, `copy` instructions that copy a value from stack
slot back to the same stack slot.  It replaces them with `copy_nop` instructions
that have a null encoding (hence producing no code).

For x86_64, `copy_nop` encodings for the types I64, I32, F64 and F32 are
provided.  Unfortunately the code that detects the redundant copy doesn't
check the type of the copied value, hence leaving itself open to the danger of
creating a `copy_nop` instruction cannot be encoded (which is different from
saying it has a null encoding).

This patch:

* Expands the x86_64 set of `copy_nop` encodings to: I64 I32 I16 I8 F64 and F32

* Adds encodings for the same for x86_32, rv64 and rv32.

* In `visit_inst()` in `reload.rs`, checks the type of the copied value accordingly.

* Adds comments explaining the above.
2019-06-05 13:06:22 +02:00
Lars T Hansen
420850adf0 Record information about sections of emitted code+data.
The result of the emitter is a vector of bytes holding machine code,
jump tables, and (in the future) other read-only data.  Some clients,
notably Firefox's Wasm compiler, needs to separate the machine code
from the data in order to insert more code directly after the code
generated by Cranelift.

To make such separation possible, we record more information about the
emitted bytes: the sizes of each of the sections of code, jump tables,
and read-only data, as well as the locations within the code that
reference (PC-relatively) the jump tables and read-only data.
2019-05-31 08:39:57 +02:00
iximeow
6059936113 remove rex-prefixed recipes for e9 and eb jumps
while not incorrect, the prefix has no additional semantics on these
  instructions other than taking an extra byte for the jump
2019-05-29 11:32:44 +02:00
Nicolas B. Pierron
72b5487563 Add x86 encoding for rotr_imm and rotl_imm. 2019-05-20 11:56:56 +02:00
bjorn3
71a345e813 Legalize fcvt_from_u/sint.f32/f64.i8/i16 2019-05-20 11:52:43 +02:00
Antoni Boucher
d8d573208b Remove unwrap() for branch folding 2019-04-28 16:32:01 -07:00
Antoni Boucher
4ee2747c5b Fix cranelift_preopt panic
Fix #611
2019-04-28 16:32:01 -07:00
Benjamin Bouvier
95e6fc9efc Avoid inserting checks during div/rem legalization when the input is a constant immediate; 2019-04-25 16:58:41 +02:00
Benjamin Bouvier
274415d5ee Fixes #738: Check ebbs used in jump tables in the verifier; 2019-04-17 15:37:27 +02:00
Tyler McMullen
1090dc5069 Switch from fallthrough back to jump. 2019-04-17 13:15:41 +02:00
Tyler McMullen
5596b5fadc Address code review comments, simplifying some bits of branch_opt. 2019-04-17 13:15:41 +02:00
Tyler McMullen
fd6940baaf Switch branch order opt from brif/brff to br_icmp, as that's what frontends should produce. 2019-04-17 13:15:41 +02:00
Tyler McMullen
571b87414f Switch ifcmp+brif folding to be icmp+brz folding, which is what frontends actually produce. 2019-04-17 13:15:41 +02:00
Tyler McMullen
861ef3a2e5 Questionable change: Remove domtree generation from simple_preopt testing. 2019-04-17 13:15:41 +02:00
Tyler McMullen
89a2dd9414 Add tests for branch order and branch comparison folding. 2019-04-17 13:15:41 +02:00
Tyler McMullen
fc6876c68e Fold 'ifcmp_imm' + 'brif' where imm is zero and cond is 'eq' or 'ne', into 'brz' or 'brnz'. 2019-04-17 13:15:41 +02:00
Lars T Hansen
aa926e9097 Allow readonly nontrapping loads to be hoisted by licm (#727) 2019-04-09 11:40:23 +02:00
Philip Craig
b74b49f7c6 Fix x86-64 encoding of uextend.i64.i8
The non-REX encoding of movzbl requires one of the ABCD registers as input.
2019-04-08 05:50:59 -07:00