Stream: cranelift

Topic: Debug ISLE ruleset


view this post on Zulip Bongjun Jang (Nov 01 2025 at 08:19):

Hi,

I'm wondering if there is any tool to check a specific rule is triggered during mid-end optimization with ISLE ruleset, or see what rules are triggered.

Otherwise, just short guidance which part to modify/update to see which rules are fired will be appreciated.

Thanks!

view this post on Zulip Chris Fallin (Nov 01 2025 at 19:38):

That's a great question -- I've hacked this up locally before by adding a println to each rule right-hand side body generated by islec, but that's not very usable. It would be a useful feature for someone to add tracing or stats/counters per case!

view this post on Zulip fitzgen (he/him) (Nov 03 2025 at 16:51):

we should probably add a feature to the isle crate to emit log::trace!(...) incovations for each LHS predicate part and for log::debug!(...)s for each RHS that actually gets matched and then plumb that through into a cranelift/wasmtime feature

I can file an issue

view this post on Zulip fitzgen (he/him) (Nov 03 2025 at 17:05):

fitzgen (he/him) said:

I can file an issue

https://github.com/bytecodealliance/wasmtime/issues/11971

To assist with debugging ISLE (e.g. you expect a rule to match but it doesn't), the isle crate should have an option to emit log macro invocations in the generated code. I'm imagining we would emit...

view this post on Zulip Chris Fallin (Nov 03 2025 at 17:05):

Thanks for writing that out!

view this post on Zulip Bongjun Jang (Nov 05 2025 at 00:46):

Thanks for the follow-ups!


Last updated: Dec 06 2025 at 07:03 UTC