Stream: git-wasmtime

Topic: wasmtime / issue #8788 Merge blocks in `cranelift-fronten...


view this post on Zulip Wasmtime GitHub notifications bot (Jun 12 2024 at 21:58):

fitzgen opened issue #8788:

When a block has only a single, unconditional predecessor, we should merge it into its predecessor. We see this relatively frequently do to the way that cranelift-wasm creates blocks (which can certainly be improved, but I think can't fully solve this issue).

One option is to do this during CLIF construction in cranelift-frontend when we call seal_block, as that is when we are declaring that all predecessors for a block have been linked up.

Another option is to do this somewhere in the mid-end, either when building the e-graph or when elaborating out of it.

We might want to do both, since legalization can also introduce new blocks.

view this post on Zulip Wasmtime GitHub notifications bot (Jun 12 2024 at 22:02):

fitzgen edited issue #8788:

When a block has only a single, unconditional predecessor, we should merge it into its predecessor. We see this relatively frequently due to the way that cranelift-wasm creates blocks (which can certainly be improved, but I think can't fully solve this issue).

One option is to do this during CLIF construction in cranelift-frontend when we call seal_block, as that is when we are declaring that all predecessors for a block have been linked up.

Another option is to do this somewhere in the mid-end, either when building the e-graph or when elaborating out of it.

We might want to do both, since legalization can also introduce new blocks.


Last updated: Nov 22 2024 at 16:03 UTC