Hello people! Quick question -- does cranelift require reducible control-flow graphs?
Cranelift doesn't require it.
cool, tx. (also how do you know? wasm graphs won't contain these initially; you can only get them after jump threading or such...)
context is i was thinking of having a poke at funclets or similar idioms
rustc_codegen_cranelift doesn't turn potentially irreducable control flow from rustc MIR into reducable control flow when generating cranelift ir
I never got any issues from this.
Andy Wingo said:
context is i was thinking of having a poke at funclets or similar idioms
that isn't supported by cranelift ir yet
that's why i was thinking of having a poke at it
Have you seen https://github.com/bytecodealliance/wasmtime/issues/3427, https://github.com/bytecodealliance/wasmtime/issues/2049 and https://github.com/bytecodealliance/wasmtime/issues/1677?
no i had not, thank you for those pointers!
https://github.com/bjorn3/wasmtime/tree/eh_cleanup was an experiment of mine for implementing it. Never finished it though.
@Andy Wingo to add some confirmation here, the backend parts (regalloc, cfg lowering to branches) were explicitly designed to handle irreducible control flow, and if there's something that breaks with it, I'd consider it a bug; happy to jump on any issues that arise!
Last updated: Nov 22 2024 at 16:03 UTC