bytecodealliance / bytecodealliance/wasmtime
Cranelift: Consider emitting jump tables at the end of functions
Open
cranelift
- Dominant language
- Rust
- Stars
- 18.6k
- Forks
- 1.8k
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 126
Description
Right now they are emitted inline right after the code that evaluates the table index and loads the target out of the table. This seems like it could waste instruction pipeline bandwidth and icache space. Might be better to emit them at the end of the function, similar to @alexcrichton's recent changes for emitting `MInst::TrapIf`'s trap instructions at the end of the function. Would need to integrate with the whole islands business, of course.
Contributor guide
Assessment
This issue has not been assessed yet.