wasmtime
wasmtime copied to clipboard
cranelift: ISLE wrapper for constructing constants
Description:
This pull request addresses issue #6038 by adding an ISLE wrapper for constructing constants. The goal is to allow mid-end optimization rules to generate constants generically without needing to know whether to use iconst, vconst, f32const, f64const, etc.
Changes:
- Added a helper function
ty_vecincranelift/codegen/src/isle_prelude.rs - Defined an extractor
ty_vecin `cranelift/codegen/src/prelude.isle - Introduced a new rule in
cranelift/codegen/src/prelude_opt.islefor constructing constant nodes
Additional Notes:
- It compiles without any problem and passes the
cranelifttest.
@Gonzalosilvalde thanks for the PR!
In order to ensure this is tested and works for our lowerings, would you mind switching over at least a few existing uses of iconst/etc to use this instead? Looking at the issue(s) that spawned this might help to find cases to demonstrate it as well.
Hi @Gonzalosilvalde , I noticed this PR has been quiet for a while.
Would you mind if I pick this up and continue the remaining testing work in a separate PR to help move it forward?
Hi @efJerryYang , Yeah, continue what remains without any problem