Commit Graph

235 Commits

Author SHA1 Message Date
Afonso Bordado
f4ff7c350a cranelift: Add heap support to filetest infrastructure (#3154)
* cranelift: Add heap support to filetest infrastructure

* cranelift: Explicit heap pointer placement in filetest annotations

* cranelift: Add documentation about the Heap directive

* cranelift: Clarify that heap filetests pointers must be laid out sequentially

* cranelift: Use wrapping add when computing bound pointer

* cranelift: Better error messages when invalid signatures are found for heap file tests.
2021-08-24 09:28:41 -07:00
LYK
3f2d36d532 Fix an incorrect link. 2021-03-20 03:41:03 +09:00
bjorn3
411ec3a857 Rename SimpleJIT to JIT as it isn't simple anymore 2020-12-04 13:21:13 -08:00
Pat Hickey
35c100fdca delete cranelift-faerie
see https://github.com/bytecodealliance/wasmtime/pull/1816

DEPRECATION NOTICE: the Cranelift developer team intends to stop maintaining
the `cranelift-faerie` crate and remove it from the `wasmtime` git repository
on or after August 3, 2020. We recommend users use its successor, the
`cranelift-object` crate.
2020-08-18 11:02:14 -07:00
Ömer Sinan Ağacan
0592b5a995 Fix umbrella crate URL in docs/index.md (#1694) 2020-05-13 17:05:55 -07:00
Cerberuser
f5eab5225f Fixed links in compare-llvm.md (#1690)
Several links were broken by line-breaks between the link caption and
the link itself. This commit fixes them by moving each on its own line.

Co-authored-by: k.bagrov <k.bagrov@g.nsu.ru>
2020-05-13 11:52:36 +02:00
Andrew Brown
d6796d0d23 Improve documentation of the filetest run command (#1645)
* Improve output display of RunCommand

The previous use of Debug for displaying `print` and `run` results was less than clear.

* Avoid checking the types of vectors during trampoline construction

Because DataValue only understands `V128` vectors, we avoid type-checking vector values when constructing the trampoline arguments.

* Improve the documentation of the filetest `run` command

Adds an up-to-date example of how to use the `run` and `print` directives and includes an actual use of the new directives in a SIMD arithmetic filetest.
2020-05-04 14:08:27 -05:00
Nick Fitzgerald
4471a82b0c Merge pull request #1635 from fitzgen/filetests-threads
Allow setting the number of filetest threads via the CRANELIFT_FILETESTS_THREADS env var
2020-05-01 10:06:26 -07:00
Nick Fitzgerald
c0503455be Add documentation about the CRANELIFT_FILETESTS_THREADS environment variable 2020-05-01 09:15:46 -07:00
Alex Crichton
d1aa86f91a Add AArch64 tests to CI (#1526)
* Add AArch64 tests to CI

This commit enhances our CI with an AArch64 builder. Currently we have
no physical hardware to run on so for now we run all tests in an
emulator. The AArch64 build is cross-compiled from x86_64 from Linux.
Tests all happen in release mode with a recent version of QEMU (recent
version because it's so much faster, and in release mode because debug
mode tests take quite a long time in an emulator).

The goal here was not to get all tests passing on CI, but rather to get
AArch64 running on CI and get it green at the same time. To achieve that
goal many tests are now ignored on aarch64 platforms. Many tests fail
due to unimplemented functionality in the aarch64 backend (#1521), and
all wasmtime tests involving compilation are also disabled due to
panicking attempting to generate generate instruction offset information
for trap symbolication (#1523).

Despite this, though, all Cranelift tests and other wasmtime tests
should be runnin on AArch64 through QEMU with this PR. Additionally
we'll have an AArch64 binary release of Wasmtime for Linux, although it
won't be too useful just yet since it will panic on almost all wasm
modules.

* Review comments
2020-04-22 12:56:54 -05:00
Samrat Man Singh
1958e8af96 [cranelift docs] Fix grammar code blocks and heap image (#1339)
* [cranelift docs] Move grammar segments in IR docs to code blocks

* [cranelift docs] Replace dot code in IR docs with generated image.

This is how the image was generated

$ cat > heap.dot << EOF
digraph {
        node [
              shape=record,
              fontsize=10,
              fontname="Vera Sans, DejaVu Sans, Liberation Sans, Arial, Helvetica, sans"
              ]
        "static" [label="mapped\npages|unmapped\npages|offset_guard\npages"]
}
EOF

$ dot -Tsvg -O heap.dot

* [cranelift docs] Fix indentation in grammar block

Co-Authored-By: bjorn3 <bjorn3@users.noreply.github.com>

Co-authored-by: bjorn3 <bjorn3@users.noreply.github.com>
2020-03-18 14:51:22 -07:00
Samrat Man Singh
50496efb6b [cranelift] Fix block and value names in IR documentation 2020-03-17 11:47:59 +01:00
Alex Crichton
3179dcf6f1 Update Cranelift's documentation after the merger. (#1238)
Update the documentation for the merger, and also for various changes in
Cranelift. Remove some old obsolete documentation, and convert the remaining
Sphinx files to Markdown. Some of the remaining content is still out of
date, but this is a step forward.
2020-03-05 15:51:12 -06:00
Ryan Hunt
832666c45e Mass rename Ebb and relatives to Block (#1365)
* Manually rename BasicBlock to BlockPredecessor

BasicBlock is a pair of (Ebb, Inst) that is used to represent the
basic block subcomponent of an Ebb that is a predecessor to an Ebb.

Eventually we will be able to remove this struct, but for now it
makes sense to give it a non-conflicting name so that we can start
to transition Ebb to represent a basic block.

I have not updated any comments that refer to BasicBlock, as
eventually we will remove BlockPredecessor and replace with Block,
which is a basic block, so the comments will become correct.

* Manually rename SSABuilder block types to avoid conflict

SSABuilder has its own Block and BlockData types. These along with
associated identifier will cause conflicts in a later commit, so
they are renamed to be more verbose here.

* Automatically rename 'Ebb' to 'Block' in *.rs

* Automatically rename 'EBB' to 'block' in *.rs

* Automatically rename 'ebb' to 'block' in *.rs

* Automatically rename 'extended basic block' to 'basic block' in *.rs

* Automatically rename 'an basic block' to 'a basic block' in *.rs

* Manually update comment for `Block`

`Block`'s wikipedia article required an update.

* Automatically rename 'an `Block`' to 'a `Block`' in *.rs

* Automatically rename 'extended_basic_block' to 'basic_block' in *.rs

* Automatically rename 'ebb' to 'block' in *.clif

* Manually rename clif constant that contains 'ebb' as substring to avoid conflict

* Automatically rename filecheck uses of 'EBB' to 'BB'

'regex: EBB' -> 'regex: BB'
'$EBB' -> '$BB'

* Automatically rename 'EBB' 'Ebb' to 'block' in *.clif

* Automatically rename 'an block' to 'a block' in *.clif

* Fix broken testcase when function name length increases

Test function names are limited to 16 characters. This causes
the new longer name to be truncated and fail a filecheck test. An
outdated comment was also fixed.
2020-02-07 10:46:47 -06:00
Nathan Froyd
a136d1cb00 add documentation mentions of cranelift-object where appropriate
This change makes it slightly more obvious that `cranelift-object` can
be used in lieu of `cranelift-faerie`.
2020-02-04 15:42:39 -06:00
Nick Fitzgerald
d1c53a18df Document the test run filetest mode (#1189)
* Document the `test run` filetest mode

* Clarify that `test run` functions can return any boolean
2019-10-31 10:05:10 -07:00
Benjamin Bouvier
2ee35b7ea1 Implement a Windows Baldrdash calling convention; 2019-08-16 14:25:15 +02:00
Benjamin Bouvier
abc3397017 [docs] Remove special handling of CDSL python modules; 2019-07-11 11:48:45 +02:00
Benjamin Bouvier
55f36ce81a [docs] Update docs to point to the docs.rs website; 2019-07-11 11:48:45 +02:00
Nicolas B. Pierron
bc75eee0cd Use BB-like EBB in docs/*.clif 2019-07-08 15:17:49 +02:00
lazypassion
747ad3c4c5 moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
moved crates in lib/ to src/, renamed crates, modified some files' text (#660)
2019-01-28 15:56:54 -08:00
Dan Gohman
b096d0606b Move ifcmp, icmp_imm, and ffcmp into the CPU flags doc section. 2019-01-02 11:46:15 -08:00
Bruce Mitchener
4f8753fa11 Fix typos. 2018-12-24 10:03:22 -08:00
Vincent Esche
c9666381f6 Fixed links in …/docs/compare-llvm.rst 2018-12-13 09:14:20 -05:00
Dan Gohman
a20c852148 Support heaps with no offset-guard pages.
Also, say "guard-offset pages" rather than just "guard pages" to describe the
region of a heap which is never accessible and which exists to support
optimizations for heap accesses with offsets.

And, introduce a `Uimm64` immediate type, and make all heap fields use
`Uimm64` instead of `Imm64` since they really are unsigned.
2018-12-11 15:40:24 -05:00
Dan Gohman
ef21fffa1c Clarify Cranelift's design with respect to mid-level optimization. (#619)
* Clarify Cranelift's design with respect to mid-level optimization.

Cranelift doesn't currently do much mid-level optimization, however it
is something we're thinking about, so remove text describing it as out of
scope, and add more text explaining the vision for how it would fit into
the overall system.
2018-11-28 08:54:40 -08:00
Dan Gohman
7c03ba43be Document which instructions are meant for producers to use.
This reorganizes some things in ir.rst to put all instructions not meant
for frontends to worry about in a dedicated section.

Fixes #282.
2018-11-28 06:53:04 -08:00
Dan Gohman
f0695a79d1 Add an autoinst line for fallthrough_return so that it's included in the docs. 2018-11-26 22:18:36 -08:00
Lachlan Sneff
586a8835e9 Add a readonly flag for loads (#562)
* Add readonly MemFlag

* Add readonly flag verifier check

* Make global loads readonly

* Fix gvn to consider readonly loads
2018-10-22 21:50:09 -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
Dan Gohman
da0243b0ab Update docs to reflect that saturating fp-to-int conversion is now implemented. 2018-09-05 16:35:41 -07:00
Dan Gohman
437a657899 Document tables. 2018-09-05 14:30:34 -07:00
Dan Gohman
8d41d2cc43 Add more documentation for special parameters. 2018-09-05 14:30:34 -07:00
Dan Gohman
608e74d8cb Document that b8 etc. are intended for use as SIMD elements. 2018-09-05 14:23:03 -07:00
Dan Gohman
ca9da7702e Reorganize the global value kinds. (#490)
* Reorganize the global value kinds.

This:
 - renames "deref" global values to "load" and gives it a offset that works
   like the "load" instructions' does
 - adds an explicit "iadd_imm" global value kind, which replaces the
   builtin iadd in "vmctx" and "deref" global values.
 - also renames "globalsym" to "symbol"
2018-09-04 21:09:04 -07:00
Sergey Pepyakin
9dbfbbde10 Stack Limit as an Argument Purpose (#372)
* Initial approach.

* Move stack_limit check before opening the frame

* Account for GPRs and frame pointer in stack check

* Check stack_limit example.

* Remove stack_limit attribute code.

Amends #359

* fmt
2018-08-04 06:16:21 -07:00
Dan Gohman
c5a554db83 Move the comment about Sphinx 1.4 out of the top-level README. 2018-08-02 15:25:09 -07:00
Dan Gohman
7f530cd751 Add a langref.rst page that redirects to the new ir.rst page. 2018-08-02 15:25:09 -07:00
Dan Gohman
c61f8a5baf Rename langref.rst to ir.rst.
This aligns with our use of the term "IR" rather than "IL" or
other terms involving "language".
2018-08-02 09:18:59 -07:00
Dan Gohman
c42bed7452 Update paths for the meta => meta-python rename. 2018-08-01 05:05:33 -07:00
Dan Gohman
1b42105faa Remove reserved_reg functionality. (#424)
* Remove reserved_reg functionality.

This wasn't implemented, and if we need it in the future, it seems like
it would be better to extend the concept of global values to cover this.

* Use GlobalValue::reserved_value() for sentinal values.
2018-07-31 07:57:37 -07:00
Dan Gohman
7f98f436f0 Add a link to the faerie github page. 2018-07-19 11:08:53 -07:00
Dan Gohman
20899d04a1 Fix "Title overline too short." warnings in more *.rst files. 2018-07-19 11:08:53 -07:00
Dan Gohman
753bb049f8 Fix "Title overline too short." warnings in *.rst files. 2018-07-13 17:23:23 -07:00
Dan Gohman
f4dbd38a4c Rename Cretonne to Cranelift! 2018-07-13 09:15:16 -07:00
Grégoire Geis
dd72b54eef Now diagnosing missing vmctx arguments (fixes #376) (#384)
* Now diagnosing missing vmctx arguments (fixes #376).

* Added filetest for fix of #376.

* Respect formatting rules in verifier/mod.rs.

* Added parameters for each use of vmctx in test files.

* Added comments on additions on vmctx verifications.
2018-07-03 20:59:32 -07:00
Dan Gohman
b0cce6daec Update the documentation for the new adjust_sp_* instruction names.
`adjust_sp_imm` has been split into `adjust_sp_up_imm` and
`adjust_sp_down_imm`, and `adjust_sp_down` has been added.
2018-07-02 15:43:15 -07:00
Dan Gohman
1074e2c755 Tidy up trailing whitespace. 2018-07-02 08:05:14 -07:00
Dan Gohman
8f3c49bc6c Update more references to "global variables".
This continues the transition to "global values", which aren't
implicitly dereferenced.
2018-06-28 12:52:51 -07:00
Lachlan Sneff
38ab82bcc0 Made changes for review 2018-06-15 18:33:30 -07:00