History log of /wasmtime-44.0.1/cranelift/codegen/src/opts/extends.isle (Results 1 – 15 of 15)
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
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, 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, v32.0.0, v31.0.0, v30.0.2, v30.0.1, v30.0.0, v29.0.1, v29.0.0, v28.0.1, v28.0.0, v27.0.0
# bb886ffc 14-Nov-2024 Karl Meakin <[email protected]>

ISLE: Add proper bool type (#9593)

* ISLE: add proper booleans (expressions)

Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <[email protected]>

* ISLE: add proper booleans (pattern

ISLE: Add proper bool type (#9593)

* ISLE: add proper booleans (expressions)

Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <[email protected]>

* ISLE: add proper booleans (patterns)

Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <[email protected]>

* ISLE: add proper booleans (spec expressions)

Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <[email protected]>

* ISLE: replace opaque boolean constants

Copyright (c) 2024, Arm Limited.

Replace all occurences of `$true` and `$false` with `true` and `false`.

Signed-off-by: Karl Meakin <[email protected]>

* ISLE: remove `on_lhs` argument

Instead of threading `on_lhs` through all the calls to `translate_expr`,
we can just set `is_partial` and `is_pure` on `root_flags` to true.

Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <[email protected]>

* ISLE: add proper booleans (language reference)

Copyright (c) 2024, Arm Limited.

Signed-off-by: Karl Meakin <[email protected]>

---------

Signed-off-by: Karl Meakin <[email protected]>

show more ...


Revision tags: 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
# 69b005fe 16-Aug-2024 Alex Crichton <[email protected]>

Implement a few minor optimizations around 128-bit integers (#9136)

* Implement a few minor optimizations around 128-bit integers

This commit implements a few minor changes for `i128` in both the e

Implement a few minor optimizations around 128-bit integers (#9136)

* Implement a few minor optimizations around 128-bit integers

This commit implements a few minor changes for `i128` in both the egraph
optimizations and lowerings for x64. The optimization pass will now
transform `iconcat` into a `uextend` or `sextend` where appropriate.
The x64 backend then pattern-matches this to produce slightly more
optimal machine code. Additionally the x64 backend now handles
memory/immediate operands a bit better when the argument to a 128-bit
operation is an `iconcat`.

* Update test expectations

* Match iadd lowering rules for isub

show more ...


Revision tags: v23.0.2, v23.0.1, v23.0.0, 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, v19.0.0, v18.0.3, v18.0.2, v17.0.2
# ead6c7cc 28-Feb-2024 Jamey Sharp <[email protected]>

cranelift: Fix ireduce rules (#8005)

We had two optimization rules which started off like this:

(rule (simplify (ireduce smallty val@(binary_op _ op x y)))
(if-let _ (reducible_modular_op val

cranelift: Fix ireduce rules (#8005)

We had two optimization rules which started off like this:

(rule (simplify (ireduce smallty val@(binary_op _ op x y)))
(if-let _ (reducible_modular_op val))
...)

This was intended to check that `x` and `y` came from an instruction
which not only was a binary op but also matched `reducible_modular_op`.

Unfortunately, both `binary_op` and `reducible_modular_op` were
multi-terms.
- So `binary_op` would search the eclass rooted at `val` to find each
instruction that uses a binary operator.
- Then `reducible_modular_op` would search the entire eclass again to
find an instruction which matched its criteria.

Nothing ensured that both searches would find the same instruction.

The reason these rules were written this way was because they had
additional guards (`will_simplify_with_ireduce`) which made them fairly
complex, and it seemed desirable to not have to copy those guards for
every operator where we wanted to apply this optimization.

However, we've decided that checking whether the rule is actually an
improvement is not desirable. In general, that should be the job of the
cost function. Blindly adding equivalent expressions gives us more
opportunities for other rules to fire, and we have global recursion and
growth limits to keep the process from going too wild.

As a result, we can just delete those guards. That allows us to write
the rules in a more straightforward way.

Fixes #7999.

Co-authored-by: Trevor Elliott <[email protected]>
Co-authored-by: L Pereira <[email protected]>
Co-authored-by: Chris Fallin <[email protected]>

show more ...


Revision tags: v18.0.1, v18.0.0, v17.0.1
# 74a303a8 07-Feb-2024 Trevor Elliott <[email protected]>

Guard recursion in `will_simplify_with_ireduce` (#7882)

Add a test to expose issues with unbounded recursion through `iadd`
during egraph rewrites, and bound the recursion of
`will_simplify_with_ire

Guard recursion in `will_simplify_with_ireduce` (#7882)

Add a test to expose issues with unbounded recursion through `iadd`
during egraph rewrites, and bound the recursion of
`will_simplify_with_ireduce`.

Fixes #7874

Co-authored-by: Nick Fitzgerald <[email protected]>

show more ...


# 7464bbcb 06-Feb-2024 Trevor Elliott <[email protected]>

Add missing subsume uses in egraph rules (#7879)

* Fix a few egraph rules that needed `subsume`

There were a few rules that dropped value references from the LHS
without using subsume. I think they

Add missing subsume uses in egraph rules (#7879)

* Fix a few egraph rules that needed `subsume`

There were a few rules that dropped value references from the LHS
without using subsume. I think they were probably benign as they
produced constant results, but this change is in the spirit of our
revised guidelines for egraph rules.

* Augment egraph rule guideline 2 to talk about constants

show more ...


Revision tags: v17.0.0
# 2bd90027 03-Jan-2024 scottmcm <[email protected]>

Optimize more reduction-of-an-extend cases (#7711)

* Optimize more reduction-of-an-extend cases

* Rebase atop 7719


# d12e4237 02-Jan-2024 scottmcm <[email protected]>

Simplify ireduce of modular operators, when it lowers the total instructions (#7719)


Revision tags: v16.0.0
# 36b10914 18-Dec-2023 scottmcm <[email protected]>

Cranelift: use more `iconst_[su]` in opts, notably enabling some i128 patterns (#7693)

* Cranelift: use more `iconst_[su]` in opts, notably re-enabling some i128 cases

`iconst_u` and `iconst_s` sup

Cranelift: use more `iconst_[su]` in opts, notably enabling some i128 patterns (#7693)

* Cranelift: use more `iconst_[su]` in opts, notably re-enabling some i128 cases

`iconst_u` and `iconst_s` support `$I128`, so we can now enable these even though they had to be excluded before to avoid generating `iconst.i128` that doesn't exist.

* Update for PR feedback

show more ...


# 2a367f4e 12-Dec-2023 scottmcm <[email protected]>

Cranelift: Add iconst shorthand to simplify ISLE opts (#7670)

* Demote `simm32` and `uimm8` to lowering ISLE only

There seems to be nothing in opt ISLE that actually wanted them, just something tha

Cranelift: Add iconst shorthand to simplify ISLE opts (#7670)

* Demote `simm32` and `uimm8` to lowering ISLE only

There seems to be nothing in opt ISLE that actually wanted them, just something that's more consistently done with using a 64-bit type to read from an Imm64.

And `simm32` feels like it's probably wrong to me -- `simm32` can't actually match `-1_i32` -- but I'm not confident enough in my analysis to actually change it.

* Cranelift: Add iconst shorthand to simplify ISLE opts

* Do a manually un-currying to avoid duplicating loading the `InstructionData`

* rustfmt is my nemesis

show more ...


# 2b80a281 06-Dec-2023 scottmcm <[email protected]>

Additional `extend` opt patterns (#7644)


# 239e4a1c 06-Dec-2023 scottmcm <[email protected]>

Add opt patterns for 3-way comparison (`Ord::cmp` or `<=>`) (#7636)

* Add opt patterns for 3-way comparison (`Ord::cmp` or `<=>`)

Compare clang: <https://cpp.godbolt.org/z/bTbe1556W>

* Add `spaces

Add opt patterns for 3-way comparison (`Ord::cmp` or `<=>`) (#7636)

* Add opt patterns for 3-way comparison (`Ord::cmp` or `<=>`)

Compare clang: <https://cpp.godbolt.org/z/bTbe1556W>

* Add `spaceship_[su]` extractors and constructors

show more ...


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
# 1e8b4592 28-Aug-2023 Afonso Bordado <[email protected]>

egraphs: Disable bitwise `splat` transform for floats (#6916)

* egraphs: Move `{s,u}widen+splat` rules to vector.isle

* egraphs: Disable some `splat` rules for floats


Revision tags: v12.0.1, v12.0.0, v11.0.1, v11.0.0, v10.0.1, v10.0.0, v9.0.4
# b357b1b1 07-Jun-2023 Afonso Bordado <[email protected]>

egraphs: Transform `{u,s}widen_{low,high}+splat` into `splat+{u,s}extend` (#6533)


Revision tags: v9.0.3, v9.0.2, v9.0.1, v9.0.0, v6.0.2, v7.0.1, v8.0.1, v8.0.0
# 7ebff828 17-Apr-2023 Alex Crichton <[email protected]>

Optimize sign extension via shifts (#6220)

* Optimize sign extension via shifts

This commit adds egraph optimization patterns for left-shifting a value
and then right-shifting it as a form of sign

Optimize sign extension via shifts (#6220)

* Optimize sign extension via shifts

This commit adds egraph optimization patterns for left-shifting a value
and then right-shifting it as a form of sign extending its lower bits.
This matches the behavior of the WebAssembly `i32.extend8_s`
instruction, for example. Note that the lowering of that WebAssembly
instruction does not use shifts, but historical versions of LLVM that
didn't support the instruction, or versions with the instruction
disabled, will use shifts instead.

A second rule for reduction-of-extend being the same as the original
value was added to keep an existing shift-related test passing as well.

* Add reference assemblies for new opts

show more ...


# b9a58148 11-Apr-2023 Karl Meakin <[email protected]>

ISLE: split algebraic.isle into several files (#6140)

* ISLE: split algebraic.isle into several files

* delete `algebraic.clif`

* Add `README.md`

* Remove old `algebraic.clif` tests

---------

C

ISLE: split algebraic.isle into several files (#6140)

* ISLE: split algebraic.isle into several files

* delete `algebraic.clif`

* Add `README.md`

* Remove old `algebraic.clif` tests

---------

Co-authored-by: Jamey Sharp <[email protected]>

show more ...