Stream: cranelift

Topic: Missed Optimization Opportunity


view this post on Zulip Bongjun Jang (Feb 25 2025 at 07:46):

Hi I'm looking for missed optimization opportunities in Cranelift's mid-end.

I'm considering the correctness of (possible) new optimization (simplifying) rules.
AFAIK, crocus will be a good toolkit to reason about correctness.

But I also want to listen about other perspectives that I might be missing such as performance, cost model, etc,
as I'm not aware of any tools/methodologies for them in Cranelift.
So far, I've read the doc so I know some rules stated there, such as using subsume or so.

Just small suggestions or comments will be appreciated.

Thanks!

view this post on Zulip fitzgen (he/him) (Feb 26 2025 at 17:12):

we can also run the souper synthesizer on clif, that could be good to investigate some more:

Here are some synthesized optimizations for CLIF harvested from spidermonkey.wasm with explicit bounds checks enabled. I won't have time to investigate, generalize, or implement them before I go on...
A lightweight WebAssembly runtime that is fast, secure, and standards-compliant - bytecodealliance/wasmtime

Last updated: Feb 27 2025 at 23:03 UTC