Andrew Brown
7b2d055f78
Add ability to relocate constants using RelocSink
2019-08-26 16:12:06 -07:00
Till Schneidereit
9edbfed65f
Switch from mmap to memmap to support Windows
2019-08-26 14:07:39 +02:00
Ujjwal Sharma
ec8f72bf20
Use roundss/roundsd when available for Ceil/Floor/Trunc/Nearest ( #931 )
...
Don't tie the preexisting SIMD ISA predicates to the shared
enable_simd setting but make new ones instead.
Fixes: https://github.com/CraneStation/cranelift/issues/908
2019-08-26 13:37:27 +02:00
julian-seward1
b8fb52446c
Cranelift: implement redundant fill removal on tree-shaped CFG regions. Mozilla bug 1570584. ( #906 )
2019-08-25 19:37:34 +02:00
Andrew Brown
cc57e84cbd
Fix segfault due to b64 encoding ( #919 )
...
* Fix segfault due to b64 encoding
Prior to this patch, bconst.b64 encoded its instruction with a 32-bit immediate that caused improper decoding of the MOV instruction; instead, use a REX prefix and rely on zero-extension of the immediate. Fixes #911 .
2019-08-23 18:04:34 +02:00
Andrew Brown
ff3c44385c
Add test run to cranelift-filetests to allow executing CLIF ( #890 )
...
* Add ability to run CLIF IR using `clif-util run [-v] {file}` and add `test run` to cranelift-filetests to allow executing CLIF
This re-factors the compile/execute parts to a FunctionRunner that is shared between cranelift-filetests and clif-util. CLIF can be now be run using `clif-util run` as well as during `clif-util test` for files with a `test run` header. As before, only functions suffixed with a `run` comment are executed. The `run: fn(...) == ...` expression syntax is left for a subsequent change.
2019-08-21 18:03:09 +02:00
Dan Gohman
13f83d8291
Bump version to 0.40.0
2019-08-20 15:32:19 -07:00
Dan Gohman
fbfeaaa32b
Revert the test changes too.
...
In 1169dc520815fa4a6b1285914748408729a28caa, I forgot to git add the
test file changes.
2019-08-20 15:26:52 -07:00
Dan Gohman
0d54517d35
Bump version to 0.39.0
2019-08-20 14:26:16 -07:00
Dan Gohman
0c2c597852
Update to latest versions of term, capstone, wabt, goblin, wasmparser.
2019-08-20 14:18:14 -07:00
Andrew Brown
b4ef90cfcd
Remove SSE2 setting for x86
...
In talking to @sunfishcode, he preferred to avoid the confusion of more ISA predicates by eliminating SSE2. SSE2 was released with the Pentium 4 in 2000 so it is unlikely that current CPUs would have SIMD enabled and not have this feature. I tried to note the SSE2-specific instructions with comments in the code.
2019-08-20 10:21:12 -07:00
Andrew Brown
3fdc78174f
Add x86 implementation of extractlane instruction
2019-08-20 10:21:12 -07:00
Carmen Kwan
19257f80c1
Add reference types R32 and R64
...
-Add resumable_trap, safepoint, isnull, and null instructions
-Add Stackmap struct and StackmapSink trait
Co-authored-by: Mir Ahmed <mirahmed753@gmail.com >
Co-authored-by: Dan Gohman <sunfish@mozilla.com >
2019-08-16 11:35:16 -07:00
Benjamin Bouvier
b659262d2a
Use aliasing instead of copying in simple_preopt;
2019-08-16 10:41:51 -07:00
Benjamin Bouvier
2ee35b7ea1
Implement a Windows Baldrdash calling convention;
2019-08-16 14:25:15 +02:00
Sean Stangl
c7b4b98cac
Add a fold_redundant_jumps() pass to the branch relaxation phase. ( #887 )
2019-08-09 15:30:11 -06:00
Yury Delendik
00b8d019c9
Bump version to 0.38.0 ( #894 )
2019-08-06 14:41:13 -05:00
Benjamin Bouvier
627ba24b59
Simplify jump table instructions and add missing conversion;
...
This makes non-legalized jump table instructions operate on operands with
pointer-sized types. This means we need to extend smaller types into the
pointer-sized operand, when the two don't match.
2019-08-02 18:39:39 +02:00
Nicolas B. Pierron
f0d7438728
Properly legalize with empty jump tables.
2019-08-01 13:47:28 +02:00
iximeow
6e57e3f8f3
preopt: use replaced arg after having replaced BinaryImm
...
when replacing BinaryImm, we use the prior arg, but later use the arg
that was replaced when writing an alias if we can determine the new op
is actually equivalent to a simple copy
2019-08-01 11:00:37 +02:00
Benjamin Bouvier
23ac723d4c
Simple preopt: fold instructions using simple algebraic identities;
2019-07-31 17:42:05 +02:00
Benjamin Bouvier
2fef2eef67
Simple preopt: try to fold right-shift of left-shift into an extended move;
2019-07-31 17:42:05 +02:00
bjorn3
8e33ca3055
Fix tests
2019-07-31 15:20:08 +02:00
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