|
Revision tags: dev, v36.0.9, v44.0.1, v43.0.2, v36.0.8, v24.0.8, v44.0.0, v43.0.1, v42.0.2, v36.0.7, v24.0.7, v43.0.0, v42.0.1, v41.0.4, v42.0.0, v40.0.4, v36.0.6, v24.0.6, v41.0.3, v41.0.2, v41.0.1, v36.0.5, v40.0.3, v41.0.0, v36.0.4, v39.0.2, v40.0.2, v40.0.1, v40.0.0, v39.0.1, v39.0.0 |
|
| #
e5aa9983 |
| 19-Nov-2025 |
Alex Crichton <[email protected]> |
Remove indicatif dependency from bugpoint (#12048)
This has fallen pretty far behind the development of upstream, it now has unmaintained dependencies, and AFAIK it's not a load-bearing dependency a
Remove indicatif dependency from bugpoint (#12048)
This has fallen pretty far behind the development of upstream, it now has unmaintained dependencies, and AFAIK it's not a load-bearing dependency at this time. Remove it in favor of simple prints for now.
Closes #12045
show more ...
|
|
Revision tags: v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1 |
|
| #
778771d2 |
| 15-Oct-2025 |
Alex Crichton <[email protected]> |
Update nightly rust used in CI (#11856)
* Update nightly rust used in CI
A few more warnings are cropping up so squash them.
* Frob the `unreachable_code` lint
Looks like nightly rust has gotten
Update nightly rust used in CI (#11856)
* Update nightly rust used in CI
A few more warnings are cropping up so squash them.
* Frob the `unreachable_code` lint
Looks like nightly rust has gotten much more aggressive about linting on unreachable code.
prtest:full
* Allow some more warnings...
show more ...
|
|
Revision tags: v37.0.2, v37.0.1, v37.0.0, v36.0.2, v36.0.1, v36.0.0, v35.0.0, v24.0.4, v33.0.2, v34.0.2, v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0, v33.0.0 |
|
| #
90ac295e |
| 19-May-2025 |
Alex Crichton <[email protected]> |
Update Wasmtime to the 2024 Rust Edition (#10806)
* Update Wasmtime to the 2024 Rust Edition
Now that our MSRV supports the 2024 edition it's possible to make this switch. This commit moves Wasmtim
Update Wasmtime to the 2024 Rust Edition (#10806)
* Update Wasmtime to the 2024 Rust Edition
Now that our MSRV supports the 2024 edition it's possible to make this switch. This commit moves Wasmtime to the 2024 Edition to keep up-to-date with Rust idioms and access many of the edition features exclusive to the 2024 edition.
prtest:full
* Reformat with the 2024 edition
show more ...
|
|
Revision tags: v32.0.0 |
|
| #
94ec88ea |
| 08-Apr-2025 |
Chris Fallin <[email protected]> |
Cranelift: initial try_call / try_call_indirect (exception) support. (#10510)
* Cranelift: initial try_call / try_call_indirect (exception) support.
This PR adds `try_call` and `try_call_indirect`
Cranelift: initial try_call / try_call_indirect (exception) support. (#10510)
* Cranelift: initial try_call / try_call_indirect (exception) support.
This PR adds `try_call` and `try_call_indirect` instructions, and lowerings on four of five ISAs (x86-64, aarch64, riscv64, pulley; s390x has its own non-shared ABI code that will need separate work).
It extends CLIF to support these instructions as new kinds of branches, and extends block-calls to accept `retN` and `exnN` block-call args that carry the normal return values or exception payloads (respectively) into the appropriate successor blocks.
It wires up the "normal return path" so that it continues to work. It updates the ABI so that unwinding is possible without an initial register state at throw: specifically, as per our RFC, all registers are clobbered. It also includes metadata in the `MachBuffer` that describes exception-catch destinations. However, no unwinder exists to interpret these catch-destinations yet, so they are untested.
* Add try_call_indirect lowering as well.
show more ...
|
|
Revision tags: v31.0.0, v30.0.2, v30.0.1, v30.0.0, v29.0.1, v29.0.0, v28.0.1 |
|
| #
4f52f294 |
| 09-Jan-2025 |
Alex Crichton <[email protected]> |
Enable some more 2024 migration lints (#9962)
Most don't produce many warnings except for `rust-2024-incompatible-pat` which required removal of a number of `ref` and `ref mut` keywords throughout t
Enable some more 2024 migration lints (#9962)
Most don't produce many warnings except for `rust-2024-incompatible-pat` which required removal of a number of `ref` and `ref mut` keywords throughout the workspace.
show more ...
|
|
Revision tags: v28.0.0 |
|
| #
45b60bd6 |
| 02-Dec-2024 |
Alex Crichton <[email protected]> |
Start using `#[expect]` instead of `#[allow]` (#9696)
* Start using `#[expect]` instead of `#[allow]`
In Rust 1.81, our new MSRV, a new feature was added to Rust to use `#[expect]` to control lint
Start using `#[expect]` instead of `#[allow]` (#9696)
* Start using `#[expect]` instead of `#[allow]`
In Rust 1.81, our new MSRV, a new feature was added to Rust to use `#[expect]` to control lint levels. This new lint annotation will silence a lint but will itself cause a lint if it doesn't actually silence anything. This is quite useful to ensure that annotations don't get stale over time.
Another feature is the ability to use a `reason` directive on the attribute with a string explaining why the attribute is there. This string is then rendered in compiler messages if a warning or error happens.
This commit migrates applies a few changes across the workspace:
* Some `#[allow]` are changed to `#[expect]` with a `reason`. * Some `#[allow]` have a `reason` added if the lint conditionally fires (mostly related to macros). * Some `#[allow]` are removed since the lint doesn't actually fire. * The workspace configures `clippy::allow_attributes_without_reason = 'warn'` as a "ratchet" to prevent future regressions. * Many crates are annotated to allow `allow_attributes_without_reason` during this transitionary period.
The end-state is that all crates should use `#[expect(..., reason = "...")]` for any lint that unconditionally fires but is expected. The `#[allow(..., reason = "...")]` lint should be used for conditionally firing lints, primarily in macro-related code. The `allow_attributes_without_reason = 'warn'` level is intended to be permanent but the transitionary `#[expect(clippy::allow_attributes_without_reason)]` crate annotations to go away over time.
* Fix adapter build
prtest:full
* Fix one-core build of icache coherence
* Use `allow` for missing_docs
Work around rust-lang/rust#130021 which was fixed in Rust 1.83 and isn't fixed for our MSRV at this time.
* More MSRV compat
show more ...
|
|
Revision tags: v27.0.0, v26.0.1, v25.0.3, v24.0.2, v26.0.0, v21.0.2, v22.0.1, v23.0.3, v25.0.2, v24.0.1 |
|
| #
9fc41bae |
| 01-Oct-2024 |
Alex Crichton <[email protected]> |
Convert `TrapCode` to a single byte (#9338)
* Convert `TrapCode` to a single byte
This commit refactors the representation of `cranelift_codegen::ir::TrapCode` to be a single byte. The previous enu
Convert `TrapCode` to a single byte (#9338)
* Convert `TrapCode` to a single byte
This commit refactors the representation of `cranelift_codegen::ir::TrapCode` to be a single byte. The previous enumeration is replaced with an opaque byte-sized structure. Previous variants that Cranelift uses internally are now associated `const` values on `TrapCode` itself. For example `TrapCode::IntegerOverflow` is now `TrapCode::INTEGER_OVERFLOW`. All non-Cranelift traps are now removed and exclusively live in the `wasmtime-cranelift` crate now.
The representation of a `TrapCode` is now:
* 0 - invalid, used in `MemFlags` for "no trap code" * 1..256-N - user traps * 256-N..256 - built-in Cranelift traps (it uses N of these)
This enables embedders to have 255-N trap codes which is more than enough for Wasmtime for example. Cranelift reserves a few built-in codes for itself which shouldn't eat too much into the trap space. Additionally if Cranelift needs to grow a new trap it can do so pretty easily too.
The overall intent of this commit is to reduce the coupling of Wasmtime and Cranelift further and generally refactor Wasmtime to use user traps more often. This additionally shrinks the size of `TrapCode` for storage in various locations, notably it can now infallibly be represented inside of a `MemFlags`.
Closes #9310
* Fix some more tests
* Fix more tests
* Fix even more tests
* Review comments
* Fix tests
* Fix rebase conflict
* Update test expectations
show more ...
|
|
Revision tags: v25.0.1, v25.0.0 |
|
| #
f96aac79 |
| 19-Sep-2024 |
bjorn3 <[email protected]> |
Deprecate Context::compile_and_emit (#9281)
The only thing it does over Context::compile is writing the machine code to a Vec specified by the user. Every user of Context::compile_and_emit in Cranel
Deprecate Context::compile_and_emit (#9281)
The only thing it does over Context::compile is writing the machine code to a Vec specified by the user. Every user of Context::compile_and_emit in Cranelift didn't actually need ownership over the machine code bytes and thus would have been able to use Context::compile instead to avoid an unnecessary allocation. This commit moves all in-tree users of compile_and_emit to compile and additionally to avoid other users adding an unnecessary allocation as they though it to be necessary, this commit additionally deprecates compile_and_emit.
show more ...
|
| #
b81ef46c |
| 22-Aug-2024 |
Nick Fitzgerald <[email protected]> |
Remove reference types (`r32` and `r64`) from Cranelift (#9164)
* Remove reference types (`r32` and `r64`) from Cranelift
* restore fuzz regression test
|
|
Revision tags: v24.0.0, v23.0.2 |
|
| #
a0442ea0 |
| 05-Aug-2024 |
Hamir Mahal <[email protected]> |
Enforce `uninlined_format_args` for the workspace (#9065)
* Enforce `uninlined_format_args` for the workspace
* fix: failing `Monolith Checks` job
* fix: formatting
|
|
Revision tags: v23.0.1, v23.0.0 |
|
| #
81eab489 |
| 08-Jul-2024 |
zleyyij <[email protected]> |
closes #2827: remove srclocs from bugpoint (#8883)
* closes #2827: remove srclocs from bugpoint
* cranelift(fix): bugpoint only removes sourcelocs if function still crashes
* fix formatting
-----
closes #2827: remove srclocs from bugpoint (#8883)
* closes #2827: remove srclocs from bugpoint
* cranelift(fix): bugpoint only removes sourcelocs if function still crashes
* fix formatting
---------
Co-authored-by: zleyyij <[email protected]>
show more ...
|
|
Revision tags: v22.0.0, v21.0.1, v21.0.0, v20.0.2, v20.0.1, v20.0.0, v17.0.3, v19.0.2, v18.0.4, v19.0.1 |
|
| #
7ad36677 |
| 26-Mar-2024 |
Jamey Sharp <[email protected]> |
cranelift: Add DFG helper for resolving all value aliases (#8238)
And demonstrate its use in bugpoint. That doesn't have much impact on anything, which I hope makes this easier to review than changi
cranelift: Add DFG helper for resolving all value aliases (#8238)
And demonstrate its use in bugpoint. That doesn't have much impact on anything, which I hope makes this easier to review than changing more important things right away.
There are other places we would probably be better off doing a whole-function rewrite once rather than calling `resolve_aliases` a bunch of times, such as the disas tests, the egraph pass, and lowering. I have not changed those in this PR.
show more ...
|
|
Revision tags: v19.0.0, v18.0.3, v18.0.2, v17.0.2 |
|
| #
9ce3ffe1 |
| 22-Feb-2024 |
Alex Crichton <[email protected]> |
Update some CI dependencies (#7983)
* Update some CI dependencies
* Update to the latest nightly toolchain * Update mdbook * Update QEMU for cross-compiled testing * Update `cargo nextest` for usag
Update some CI dependencies (#7983)
* Update some CI dependencies
* Update to the latest nightly toolchain * Update mdbook * Update QEMU for cross-compiled testing * Update `cargo nextest` for usage with MIRI
prtest:full
* Remove lots of unnecessary imports
* Downgrade qemu as 8.2.1 seems to segfault
* Remove more imports
* Remove unused winch trait method
* Fix warnings about unused trait methods
* More unused imports
* More unused imports
show more ...
|
|
Revision tags: v18.0.1, v18.0.0, v17.0.1, v17.0.0, v16.0.0 |
|
| #
f9f8a4df |
| 08-Dec-2023 |
Xinzhao Xu <[email protected]> |
Replace clap attributes with command and arg (#7658)
|
|
Revision tags: v15.0.1, v15.0.0, v14.0.4, v14.0.3, v14.0.2, v13.0.1, v14.0.1, v14.0.0, minimum-viable-wasi-proxy-serve, v13.0.0, v12.0.2, v11.0.2, v10.0.2 |
|
| #
62fdafa1 |
| 29-Aug-2023 |
Alex Crichton <[email protected]> |
Remove clippy configuration from repo and crates (#6927)
Wasmtime's CI does not run clippy so there's no enforcement of this configuration. Additionally the configuration per-crate is not uniformly
Remove clippy configuration from repo and crates (#6927)
Wasmtime's CI does not run clippy so there's no enforcement of this configuration. Additionally the configuration per-crate is not uniformly applied across all of the Wasmtime workspace and is only on some historical crates. Because we don't run clippy in CI this commit removes all of the clippy annotations for allow/warn/deny from the source.
show more ...
|
|
Revision tags: v12.0.1, v12.0.0, v11.0.1, v11.0.0, v10.0.1, v10.0.0, v9.0.4, v9.0.3, v9.0.2, v9.0.1, v9.0.0, v6.0.2, v7.0.1, v8.0.1, v8.0.0 |
|
| #
7eb89140 |
| 05-Apr-2023 |
Remo Senekowitsch <[email protected]> |
Chaos mode MVP: Skip branch optimization in MachBuffer (#6039)
* fuzz: Add chaos mode control plane
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Wa
Chaos mode MVP: Skip branch optimization in MachBuffer (#6039)
* fuzz: Add chaos mode control plane
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* fuzz: Skip branch optimization with chaos mode
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* fuzz: Rename chaos engine -> control plane
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* chaos mode: refactoring ControlPlane to be passed through the call stack by reference
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Remo Senekowitsch <[email protected]>
* fuzz: annotate chaos todos
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* fuzz: cleanup control plane
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* fuzz: remove control plane from compiler context
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* fuzz: move control plane into emit state
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* fuzz: fix remaining compiler errors
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* fix tests
* refactor emission state ctrl plane accessors
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* centralize conditional compilation of chaos mode
Also cleanup a few straggling dependencies on cranelift-control that aren't needed anymore.
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* add cranelift-control to published crates
prtest:full
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
* add cranelift-control to public crates
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]>
---------
Co-authored-by: Falk Zwimpfer <[email protected]> Co-authored-by: Moritz Waser <[email protected]> Co-authored-by: Remo Senekowitsch <[email protected]>
show more ...
|
|
Revision tags: v7.0.0, v6.0.1, v5.0.1, v4.0.1, v6.0.0 |
|
| #
80c147d9 |
| 16-Feb-2023 |
Trevor Elliott <[email protected]> |
Rework br_table to use BlockCall (#5731)
Rework br_table to use BlockCall, allowing us to avoid adding new nodes during ssa construction to hold block arguments. Additionally, many places where we p
Rework br_table to use BlockCall (#5731)
Rework br_table to use BlockCall, allowing us to avoid adding new nodes during ssa construction to hold block arguments. Additionally, many places where we previously matched on InstructionData to extract branch destinations can be replaced with a use of branch_destination or branch_destination_mut.
show more ...
|
| #
aba239e9 |
| 15-Feb-2023 |
Trevor Elliott <[email protected]> |
Fix handling of jumps in bugpoint (#5794)
Fixes #5792
|
| #
a5698ced |
| 30-Jan-2023 |
Trevor Elliott <[email protected]> |
cranelift: Remove brz and brnz (#5630)
Remove the brz and brnz instructions, as their behavior is now redundant with brif.
|
|
Revision tags: v5.0.0 |
|
| #
1e6c13d8 |
| 18-Jan-2023 |
Trevor Elliott <[email protected]> |
cranelift: Rework block instructions to use BlockCall (#5464)
Add a new type BlockCall that represents the pair of a block name with arguments to be passed to it. (The mnemonic here is that it looks
cranelift: Rework block instructions to use BlockCall (#5464)
Add a new type BlockCall that represents the pair of a block name with arguments to be passed to it. (The mnemonic here is that it looks a bit like a function call.) Rework the implementation of jump, brz, and brnz to use BlockCall instead of storing the block arguments as varargs in the instruction's ValueList.
To ensure that we're processing block arguments from BlockCall values in instructions, three new functions have been introduced on DataFlowGraph that both sets of arguments:
inst_values - returns an iterator that traverses values in the instruction and block arguments
map_inst_values - applies a function to each value in the instruction and block arguments
overwrite_inst_values - overwrite all values in an instruction and block arguments with values from the iterator
Co-authored-by: Jamey Sharp <[email protected]>
show more ...
|
|
Revision tags: v4.0.0 |
|
| #
25bf8e0e |
| 16-Dec-2022 |
Trevor Elliott <[email protected]> |
Make DataFlowGraph::insts public, but restricted (#5450)
We have some operations defined on DataFlowGraph purely to work around borrow-checker issues with InstructionData and other data on DataFlowG
Make DataFlowGraph::insts public, but restricted (#5450)
We have some operations defined on DataFlowGraph purely to work around borrow-checker issues with InstructionData and other data on DataFlowGraph. Part of the problem is that indexing the DFG directly hides the fact that we're only indexing the insts field of the DFG.
This PR makes the insts field of the DFG public, but wraps it in a newtype that only allows indexing. This means that the borrow checker is better able to tell when operations on memory held by the DFG won't conflict, which comes up frequently when mutating ValueLists held by InstructionData.
show more ...
|
| #
f2e1eaa8 |
| 12-Dec-2022 |
Nick Fitzgerald <[email protected]> |
cranelift-filetest: Add support for Wasm-to-CLIF translation filetests (#5412)
This adds support for `.wat` tests in `cranelift-filetest`. The test runner
translates the WAT to Wasm and then uses `
cranelift-filetest: Add support for Wasm-to-CLIF translation filetests (#5412)
This adds support for `.wat` tests in `cranelift-filetest`. The test runner
translates the WAT to Wasm and then uses `cranelift-wasm` to translate the Wasm
to CLIF.
These tests are always precise output tests. The test expectations can be
updated by running tests with the `CRANELIFT_TEST_BLESS=1` environment variable
set, similar to our compile precise output tests. The test's expected output is
contained in the last comment in the test file.
The tests allow for configuring the kinds of heaps used to implement Wasm linear
memory via TOML in a `;;!` comment at the start of the test.
To get ISA and Cranelift flags parsing available in the filetests crate, I had
to move the `parse_sets_and_triple` helper from the `cranelift-tools` binary
crate to the `cranelift-reader` crate, where I think it logically
fits.
Additionally, I had to make some more bits of `cranelift-wasm`'s dummy
environment `pub` so that I could properly wrap and compose it with the
environment used for the `.wat` tests. I don't think this is a big deal, but if
we eventually want to clean this stuff up, we can probably remove the dummy
environments completely, remove `translate_module`, and fold them into these new
test environments and test runner (since Wasmtime isn't using those things
anyways).
show more ...
|
|
Revision tags: v3.0.1, v3.0.0, v1.0.2, v2.0.2, v2.0.1 |
|
| #
c8791073 |
| 24-Oct-2022 |
Afonso Bordado <[email protected]> |
cranelift: Remove `iconst.i128` (#5075)
* cranelift: Remove iconst.i128
* bugpoint: Report Changed when only one instruction is mutated
* cranelift: Fix egraph bxor rule
* cranelift: Remove
cranelift: Remove `iconst.i128` (#5075)
* cranelift: Remove iconst.i128
* bugpoint: Report Changed when only one instruction is mutated
* cranelift: Fix egraph bxor rule
* cranelift: Remove some simple_preopt opts for i128
show more ...
|
|
Revision tags: v2.0.0 |
|
| #
32a7593c |
| 17-Oct-2022 |
Trevor Elliott <[email protected]> |
cranelift: Remove booleans (#5031)
Remove the boolean types from cranelift, and the associated instructions breduce, bextend, bconst, and bint. Standardize on using 1/0 for the return value from ins
cranelift: Remove booleans (#5031)
Remove the boolean types from cranelift, and the associated instructions breduce, bextend, bconst, and bint. Standardize on using 1/0 for the return value from instructions that produce scalar boolean results, and -1/0 for boolean vector elements.
Fixes #3205
Co-authored-by: Afonso Bordado <[email protected]>
Co-authored-by: Ulrich Weigand <[email protected]>
Co-authored-by: Chris Fallin <[email protected]>
show more ...
|
|
Revision tags: v1.0.1, v1.0.0, v0.40.1, v0.40.0 |
|
| #
3629bbbd |
| 17-Aug-2022 |
Jamey Sharp <[email protected]> |
Print constants in a comment in CLIF output (#4725)
When trying to read generated CLIF, it's nice to be able to see at a
glance that some of the operands are defined by `iconst` and similar
instru
Print constants in a comment in CLIF output (#4725)
When trying to read generated CLIF, it's nice to be able to see at a
glance that some of the operands are defined by `iconst` and similar
instructions, without having to go find each operand's definition
manually.
show more ...
|