You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is not a correctness bug but might be a performance problem. I haven't measured it, just noticed it while looking at the CLIF that Wasmtime currently generates for call_indirect.
The text was updated successfully, but these errors were encountered:
jameysharp
added
bug
Incorrect behavior in the current implementation that needs fixing
cranelift
Issues related to the Cranelift code generator
labels
Mar 20, 2024
jameysharp
added a commit
to jameysharp/wasmtime
that referenced
this issue
Mar 21, 2024
I suppose we could add a(nother) special case to the block-placement logic, where LICM etc is implemented: if the original block is cold, keep the op in the same block. That's probably limited in scope enough that it's both (i) tractable and (ii) shouldn't have unforeseen impacts?
.clif
Test CaseWasmtime currently translates this WebAssembly module:
To this CLIF, before optimization:
Steps to Reproduce
Optimize this CLIF with the egraph pass enabled using
opt_level=speed
.Expected Results
I think the loads of
v17
andv18
should stay in thecold
block.Actual Results
The loads of
v17
andv18
are hoisted to the entry block, since they have thenotrap
andreadonly
flags set and depend only on the vmctx parameter,v0
.Versions and Environment
Cranelift version or commit: tested on afaf1c7
Extra Info
This is not a correctness bug but might be a performance problem. I haven't measured it, just noticed it while looking at the CLIF that Wasmtime currently generates for
call_indirect
.cc: @cfallin
The text was updated successfully, but these errors were encountered: