Stream: git-wasmtime

Topic: wasmtime / issue #13068 Drastically slower egraph optimiz...


view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 14:55):

alexcrichton opened issue #13068:

Bisection shows that #12926 is the cause. Timings are:

on 15783254a8095a1a03d9de25c03816ce3acea9bd

$ cargo build && time ../target/debug/clif-util test ../foo.clif
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
STALLED for 3 seconds with 0/1 tests finished
slow: ../foo.clif
1 tests
../target/debug/clif-util test ../foo.clif  9.86s user 0.24s system 100% cpu 10.097 total

on 96b47c7d4e17934ca88a1aa0e8e9400cb4b152ca (parent of the above)

$ cargo build && time ../target/debug/clif-util test ../foo.clif
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
1 tests
../target/debug/clif-util test ../foo.clif  0.07s user 0.01s system 107% cpu 0.081 total

cc @myunbin and @cfallin, I'm not sure myself how to debug blowups in egraph passes -- is this something were we need to more aggressively use subsume?

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 14:55):

alexcrichton added the fuzz-bug label to Issue #13068.

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 14:56):

alexcrichton commented on issue #13068:

er, sorry, the test case here is this one (fuzz-generated)

view this post on Zulip Wasmtime GitHub notifications bot (Apr 13 2026 at 20:33):

cfallin commented on issue #13068:

The only real way to bottom these out at the moment is to look at the trace-log output of Cranelift and dig through the many many lines of rewrites, reconstructing the RHSes of intermediate expressions in one's head. We have more limiting than we did in the past (5 levels of recursion, 5 members of an eclass total) but it still is plausible that we've missed some form of blowup. And, yes, using subsume is still a good idea when we are clear a rewrite is unambiguously better, for efficiency. Nothing in the contributed ruleset stands out to me as obviously recursive but I haven't dug into this testcase.

I'll go ahead and roll back #12926 and we can re-review it with subsume...

view this post on Zulip Wasmtime GitHub notifications bot (Apr 14 2026 at 00:02):

alexcrichton closed issue #13068:

Bisection shows that #12926 is the cause. Timings are:

on 15783254a8095a1a03d9de25c03816ce3acea9bd

$ cargo build && time ../target/debug/clif-util test ../foo.clif
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.07s
STALLED for 3 seconds with 0/1 tests finished
slow: ../foo.clif
1 tests
../target/debug/clif-util test ../foo.clif  9.86s user 0.24s system 100% cpu 10.097 total

on 96b47c7d4e17934ca88a1aa0e8e9400cb4b152ca (parent of the above)

$ cargo build && time ../target/debug/clif-util test ../foo.clif
    Finished `dev` profile [unoptimized + debuginfo] target(s) in 0.12s
1 tests
../target/debug/clif-util test ../foo.clif  0.07s user 0.01s system 107% cpu 0.081 total

cc @myunbin and @cfallin, I'm not sure myself how to debug blowups in egraph passes -- is this something were we need to more aggressively use subsume?


Last updated: May 03 2026 at 22:13 UTC