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 callseal_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.
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 callseal_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: Dec 23 2024 at 12:05 UTC