|
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, v38.0.4, v37.0.3, v36.0.3, v24.0.5, v38.0.3, v38.0.2, v38.0.1, v37.0.2 |
|
| #
2a2e8f62 |
| 01-Oct-2025 |
bjorn3 <[email protected]> |
Couple cleanups to the flags/settings handling in Cranelift (#11744)
* Remove unused shared flags
* Get rid of predicate settings
They were important in the old backend framework, but with the new
Couple cleanups to the flags/settings handling in Cranelift (#11744)
* Remove unused shared flags
* Get rid of predicate settings
They were important in the old backend framework, but with the new backend framework if we need a combination of multiple settings, that can just be done as a regular extractor doing &&. This simplifies the settings implementation.
show more ...
|
|
Revision tags: 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 |
|
| #
0854775b |
| 08-Jul-2025 |
bjorn3 <[email protected]> |
Couple of optimizations to the Cranelift incremental cache (#11186)
* Fix a couple of comments
* Remove flags.predicate_view()
It is a remenant of the old backend framework.
* Avoid string conver
Couple of optimizations to the Cranelift incremental cache (#11186)
* Fix a couple of comments
* Remove flags.predicate_view()
It is a remenant of the old backend framework.
* Avoid string conversions for hashing the TargetIsa
* Remove func_body_len
It is identical to buffer.data.len()
* Introduce IsaFlagsHashKey
show more ...
|
| #
099102d9 |
| 07-Jul-2025 |
Alex Crichton <[email protected]> |
Remove `expect(clippy::allow_attributes_without_reason)` from cranelift-codegen (#11182)
* Remove `expect(clippy::allow_attributes_without_reason)` from cranelift-codegen
This commit gets around to
Remove `expect(clippy::allow_attributes_without_reason)` from cranelift-codegen (#11182)
* Remove `expect(clippy::allow_attributes_without_reason)` from cranelift-codegen
This commit gets around to migrating the `cranelift-codegen` crate to require a reason on lint directives and additionally switch to `#[expect]` where possible.
prtest:full
* Move x64-only item to x64 backend
show more ...
|
|
Revision tags: v34.0.1, v33.0.1, v24.0.3, v32.0.1, v34.0.0 |
|
| #
8a42768f |
| 06-Jun-2025 |
Alex Crichton <[email protected]> |
Update nightly used in CI (#10957)
A new lint was added to rustc so this updates the nightly used in CI and then additionally fixes the lints that are firing.
|
|
Revision tags: 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, v31.0.0 |
|
| #
c3bf042a |
| 07-Mar-2025 |
Andrew Brown <[email protected]> |
meta: deduplicate source generation infrastructure (#10348)
* Move `Formatter` and `Error` to new crate: `cranelift-srcgen`
The `cranelift-codegen-meta` crate emits both Rust and ISLE source code u
meta: deduplicate source generation infrastructure (#10348)
* Move `Formatter` and `Error` to new crate: `cranelift-srcgen`
The `cranelift-codegen-meta` crate emits both Rust and ISLE source code using a `Formatter` which may fail with an `Error`. The `cranelift-assembler-x64-meta` crate uses a subset of this functionality. To deduplicate efforts, this creates a new crate, `cranelift-srcgen`, and moves only the `cranelift-codgen-meta` functionality there (for now).
* Add notion of a formatted `Language`; append file locations
While developing `cranelift-assembler-x64`, it became clear that knowing the source code location that _generated_ some code was extremely useful. This change alters the `fmtln!` macro to append file locations as comments to the generated code; this doesn't change all the `fmt.line()` invocations but it's a start. To do this, we need to know which language we are generating to emit the correct comment kind. This led to adding a new `enum Language` to identify that.
* Rename `update_file` to `write`
* Use shared `Formatter` in `cranelift-assembler-x64-meta`
This change removes the duplicate implementation of `Formatter` in `cranelift-assembler-x64-meta` and replaces it with the shared `Formatter` in `cranelift-srcgen`.
* Add `Formatter::add_block`
While implementing all these changes, I noticed an opportunity: by adding `Formatter::add_block` we can automatically adds braces and indentation. This should be more safe (i.e., harder to forget to append the ending `}`) and result in less verbose generator code (no need for `fmtln!(...)` then `f.indent(|f| ...)`). This refactoring does touch a large amount of code, though.
Now with `Formatter::add_block`, we can allow the `fmtln!` macro to auto-format no-arg format strings (e.g., `fmtln!(f, "{x}")`), which should be a bit more ergonomic. This does mean that a few locations that weren't covered by `Formatter::add_block` need some extra escaping (e.g., `{` -> `{{`).
* Avoid appending a file location comment to a Rust comment
* Make `cranelift-srcgen` publishable
This ensures the crate has a version and is tracked by `cranelift-srcgen`.
show more ...
|
|
Revision tags: v30.0.2, v30.0.1, v30.0.0, v29.0.1, v29.0.0, v28.0.1 |
|
| #
de1ad347 |
| 09-Jan-2025 |
Alex Crichton <[email protected]> |
Enable `impl-trait-overcaptures` 2024 transition lint (#9965)
* Enable `impl-trait-overcaptures` 2024 transition lint
This lint detects cases where returning `impl Trait` will work differently in 2
Enable `impl-trait-overcaptures` 2024 transition lint (#9965)
* Enable `impl-trait-overcaptures` 2024 transition lint
This lint detects cases where returning `impl Trait` will work differently in 2024 than in the current 2021 edition. Ambiguities are resolved with `use<..>` syntax stabilized in Rust 1.82.0 to mean the same thing in both editions.
* Fix some more `impl Trait` returns
* Tighten bounds on settings `iter`
* Fix build on 1.82.0
* Fix another capture on MSRV
show more ...
|
|
Revision tags: v28.0.0, 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, v25.0.1, v25.0.0, 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, v22.0.0, v21.0.1, v21.0.0, v20.0.2, v20.0.1 |
|
| #
47d1640e |
| 02-May-2024 |
Michael McLoughlin <[email protected]> |
cranelift/codegen/meta: provide entry point to generate ISLE code only (#8462)
* extract isle code generation
* revert some customizations
* revert changes to meta/src/error.rs
|
|
Revision tags: v20.0.0, v17.0.3, v19.0.2, v18.0.4, v19.0.1, v19.0.0, v18.0.3, v18.0.2, v17.0.2, v18.0.1, v18.0.0, v17.0.1, v17.0.0, v16.0.0, 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, 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 |
|
| #
85118c8c |
| 17-Apr-2023 |
kevaundray <[email protected]> |
Add clippy suggestions (#6203)
* add clippy suggestions
* revert &/ref change
* Update cranelift/isle/isle/src/parser.rs
Co-authored-by: Jamey Sharp <[email protected]>
---------
Co-authored-by
Add clippy suggestions (#6203)
* add clippy suggestions
* revert &/ref change
* Update cranelift/isle/isle/src/parser.rs
Co-authored-by: Jamey Sharp <[email protected]>
---------
Co-authored-by: Jamey Sharp <[email protected]>
show more ...
|
|
Revision tags: v7.0.0, v6.0.1, v5.0.1, v4.0.1 |
|
| #
013b35ff |
| 08-Mar-2023 |
Kevin Rizzo <[email protected]> |
winch: Refactoring wasmtime compiler integration pieces to share more between Cranelift and Winch (#5944)
* Enable the native target by default in winch
Match cranelift-codegen's build script where
winch: Refactoring wasmtime compiler integration pieces to share more between Cranelift and Winch (#5944)
* Enable the native target by default in winch
Match cranelift-codegen's build script where if no architecture is explicitly enabled then the host architecture is implicitly enabled.
* Refactor Cranelift's ISA builder to share more with Winch
This commit refactors the `Builder` type to have a type parameter representing the finished ISA with Cranelift and Winch having their own typedefs for `Builder` to represent their own builders. The intention is to use this shared functionality to produce more shared code between the two codegen backends.
* Moving compiler shared components to a separate crate
* Restore native flag inference in compiler building
This fixes an oversight from the previous commits to use `cranelift-native` to infer flags for the native host when using default settings with Wasmtime.
* Move `Compiler::page_size_align` into wasmtime-environ
The `cranelift-codegen` crate doesn't need this and winch wants the same implementation, so shuffle it around so everyone has access to it.
* Fill out `Compiler::{flags, isa_flags}` for Winch
These are easy enough to plumb through with some shared code for Wasmtime.
* Plumb the `is_branch_protection_enabled` flag for Winch
Just forwarding an isa-specific setting accessor.
* Moving executable creation to shared compiler crate
* Adding builder back in and removing from shared crate
* Refactoring the shared pieces for the `CompilerBuilder`
I decided to move a couple things around from Alex's initial changes. Instead of having the shared builder do everything, I went back to having each compiler have a distinct builder implementation. I refactored most of the flag setting logic into a single shared location, so we can still reduce the amount of code duplication.
With them being separate, we don't need to maintain things like `LinkOpts` which Winch doesn't currently use. We also have an avenue to error when certain flags are sent to Winch if we don't support them. I'm hoping this will make things more maintainable as we build out Winch.
I'm still unsure about keeping everything shared in a single crate (`cranelift_shared`). It's starting to feel like this crate is doing too much, which makes it difficult to name. There does seem to be a need for two distinct abstraction: creating the final executable and the handling of shared/ISA flags when building the compiler. I could make them into two separate crates, but there doesn't seem to be enough there yet to justify it.
* Documentation updates, and renaming the finish method
* Adding back in a default temporarily to pass tests, and removing some unused imports
* Fixing winch tests with wrong method name
* Removing unused imports from codegen shared crate
* Apply documentation formatting updates
Co-authored-by: Saúl Cabrera <[email protected]>
* Adding back in cranelift_native flag inferring
* Adding new shared crate to publish list
* Adding write feature to pass cargo check
---------
Co-authored-by: Alex Crichton <[email protected]> Co-authored-by: Saúl Cabrera <[email protected]>
show more ...
|
|
Revision tags: v6.0.0, v5.0.0, v4.0.0, v3.0.1, v3.0.0, v1.0.2, v2.0.2, v2.0.1 |
|
| #
51d87342 |
| 20-Oct-2022 |
Afonso Bordado <[email protected]> |
fuzzgen: Generate compiler flags (#5020)
* fuzzgen: Test compiler flags
* cranelift: Generate `all()` function for all enum flags
This allows a user to iterate all flags that exist.
* fuzzg
fuzzgen: Generate compiler flags (#5020)
* fuzzgen: Test compiler flags
* cranelift: Generate `all()` function for all enum flags
This allows a user to iterate all flags that exist.
* fuzzgen: Minimize regalloc_checker compiles
* fuzzgen: Limit the amount of test case inputs
* fuzzgen: Add egraphs flag
It's finally here!
* cranelift: Add fuzzing comment to settings
* fuzzgen: Add riscv64
* fuzzgen: Unconditionally enable some flags
show more ...
|
|
Revision tags: v2.0.0, v1.0.1, v1.0.0, v0.40.1, v0.40.0 |
|
| #
ecb91c0b |
| 10-Aug-2022 |
Jamey Sharp <[email protected]> |
List preset's settings in generated comment (#4679)
Figuring out which boolean settings go into each preset is not easy by
inspecting the DSL source (e.g. meta/src/isa/x86.rs). This patch extends
List preset's settings in generated comment (#4679)
Figuring out which boolean settings go into each preset is not easy by
inspecting the DSL source (e.g. meta/src/isa/x86.rs). This patch extends
the comments in the Rust that's generated by that DSL to list the names
of the settings together with the name of the preset.
show more ...
|
|
Revision tags: v0.39.1, v0.38.3, v0.38.2, v0.39.0 |
|
| #
9c43749d |
| 07-Jul-2022 |
Sam Parker <[email protected]> |
[RFC] Dynamic Vector Support (#4200)
Introduce a new concept in the IR that allows a producer to create
dynamic vector types. An IR function can now contain global value(s)
that represent a dynami
[RFC] Dynamic Vector Support (#4200)
Introduce a new concept in the IR that allows a producer to create
dynamic vector types. An IR function can now contain global value(s)
that represent a dynamic scaling factor, for a given fixed-width
vector type. A dynamic type is then created by 'multiplying' the
corresponding global value with a fixed-width type. These new types
can be used just like the existing types and the type system has a
set of hard-coded dynamic types, such as I32X4XN, which the user
defined types map onto. The dynamic types are also used explicitly
to create dynamic stack slots, which have no set size like their
existing counterparts. New IR instructions are added to access these
new stack entities.
Currently, during codegen, the dynamic scaling factor has to be
lowered to a constant so the dynamic slots do eventually have a
compile-time known size, as do spill slots.
The current lowering for aarch64 just targets Neon, using a dynamic
scale of 1.
Copyright (c) 2022, Arm Limited.
show more ...
|
|
Revision tags: v0.38.1, v0.38.0, v0.37.0, v0.36.0, v0.35.3, v0.34.2, v0.35.2, v0.35.1, v0.35.0, v0.33.1, v0.34.1, v0.34.0, v0.33.0, v0.32.1, v0.32.0, v0.31.0 |
|
| #
91d4f369 |
| 27-Oct-2021 |
bjorn3 <[email protected]> |
Move generate_table from cranelift-codegen-shared to cranelift-codegen-meta
|
|
Revision tags: v0.30.0, v0.29.0, v0.28.0, v0.26.1, v0.27.0, v0.26.0 |
|
| #
0ddfe97a |
| 02-Apr-2021 |
Peter Huene <[email protected]> |
Change how flags are stored in serialized modules.
This commit changes how both the shared flags and ISA flags are stored in the serialized module to detect incompatibilities when a serialized modul
Change how flags are stored in serialized modules.
This commit changes how both the shared flags and ISA flags are stored in the serialized module to detect incompatibilities when a serialized module is instantiated.
It improves the error reporting when a compiled module has mismatched shared flags.
show more ...
|
| #
abf3bf29 |
| 01-Apr-2021 |
Peter Huene <[email protected]> |
Add a `wasmtime settings` command to print Cranelift settings.
This commit adds the `wasmtime settings` command to print out available Cranelift settings for a target (defaults to the host).
The co
Add a `wasmtime settings` command to print Cranelift settings.
This commit adds the `wasmtime settings` command to print out available Cranelift settings for a target (defaults to the host).
The compile command has been updated to remove the Cranelift ISA options in favor of encouraging users to use `wasmtime settings` to discover what settings are available. This will reduce the maintenance cost for syncing the compile command with Cranelift ISA flags.
show more ...
|
| #
29d366db |
| 25-Mar-2021 |
Peter Huene <[email protected]> |
Add a compile command to Wasmtime.
This commit adds a `compile` command to the Wasmtime CLI.
The command can be used to Ahead-Of-Time (AOT) compile WebAssembly modules.
With the `all-arch` feature
Add a compile command to Wasmtime.
This commit adds a `compile` command to the Wasmtime CLI.
The command can be used to Ahead-Of-Time (AOT) compile WebAssembly modules.
With the `all-arch` feature enabled, AOT compilation can be performed for non-native architectures (i.e. cross-compilation).
The `Module::compile` method has been added to perform AOT compilation.
A few of the CLI flags relating to "on by default" Wasm features have been changed to be "--disable-XYZ" flags.
A simple example of using the `wasmtime compile` command:
```text $ wasmtime compile input.wasm $ wasmtime input.cwasm ```
show more ...
|
|
Revision tags: v0.25.0, v0.24.0, v0.23.0 |
|
| #
503129ad |
| 26-Jan-2021 |
Alex Crichton <[email protected]> |
Add a method to share `Config` across machines (#2608)
With `Module::{serialize,deserialize}` it should be possible to share
wasmtime modules across machines or CPUs. Serialization, however, embeds
Add a method to share `Config` across machines (#2608)
With `Module::{serialize,deserialize}` it should be possible to share
wasmtime modules across machines or CPUs. Serialization, however, embeds
a hash of all configuration values, including cranelift compilation
settings. By default wasmtime's selection of the native ISA would enable
ISA flags according to CPU features available on the host, but the same
CPU features may not be available across two machines.
This commit adds a `Config::cranelift_clear_cpu_flags` method which
allows clearing the target-specific ISA flags that are automatically
inferred by default for the native CPU. Options can then be
incrementally built back up as-desired with teh `cranelift_other_flag`
method.
show more ...
|
|
Revision tags: v0.22.1, cranelift-v0.69.0, v0.22.0, v0.21.0, v0.20.0, v0.19.0, v0.18.0, v0.17.0, v0.16.0, v0.15.0, cranelift-v0.62.0, cranelift-v0.61.0, cranelift-v0.60.0, v0.12.0, v0.11.0, v0.10.0, v0.9.0, v0.8.0, v0.6.0, v0.4.0 |
|
| #
f1945664 |
| 31-Oct-2019 |
Andrew Brown <[email protected]> |
Add documentation for top-level items in cranelift-codegen/meta
|
| #
5889dd2c |
| 28-Oct-2019 |
Benjamin Bouvier <[email protected]> |
[meta] Add more pub(crate) definitions.
|
| #
9f506692 |
| 24-Oct-2019 |
Peter Huene <[email protected]> |
Fix clippy warnings.
This commit fixes the current set of (stable) clippy warnings in the repo.
|
|
Revision tags: cranelift-v0.46.1, cranelift-v0.46.0 |
|
| #
d404368d |
| 09-Oct-2019 |
Benjamin Bouvier <[email protected]> |
Share constant_hash code between the meta and codegen crates;
|
|
Revision tags: cranelift-v0.45.0, cranelift-v0.44.0, cranelift-v0.43.1, cranelift-v0.43.0 |
|
| #
f0244516 |
| 17-Sep-2019 |
Benjamin Bouvier <[email protected]> |
[meta] Make more things pub(crate) instead of pub;
This could help the compiler find unused fields/methods. It didn't find any during this migration.
|
|
Revision tags: cranelift-v0.42.0, cranelift-v0.41.0, v0.3.0, v0.2.0, cranelift-v0.40.0, cranelift-v0.39.0, cranelift-v0.37.0, cranelift-v0.36.0, cranelift-v0.35.0, cranelift-v0.34.0, cranelift-v0.33.0, cranelift-v0.32.0, cranelift-v0.31.0 |
|
| #
f1d1d1e9 |
| 06-Jun-2019 |
Benjamin Bouvier <[email protected]> |
[meta] Uniquely number every instruction in the Rust crate;
|