bytecodealliance / bytecodealliance/wasmtime

Cranelift: Consider emitting jump tables at the end of functions

Open
#6,050 0 comments 1 reaction 0 assignees View on GitHub
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

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.