Implement Fast JIT multi-threading feature (#2134)

- Translate all the opcodes of threads spec proposal for Fast JIT
- Add the atomic flag for Fast JIT load/store IRs to support atomic load/store
- Add new atomic related Fast JIT IRs and translate them in the codegen
- Add suspend_flags check in branch opcodes and before/after call function
- Modify CI to enable Fast JIT multi-threading test

Co-authored-by: TianlongLiang <tianlong.liang@intel.com>
This commit is contained in:
Wenyong Huang
2023-04-20 10:09:34 +08:00
committed by GitHub
parent dfca21d239
commit 7e9bf9cdf5
15 changed files with 2290 additions and 168 deletions

View File

@ -410,6 +410,13 @@ collect_distances(RegallocContext *rc, JitBasicBlock *basic_block)
JIT_FOREACH_INSN(basic_block, insn)
{
#if WASM_ENABLE_SHARED_MEMORY != 0
/* fence insn doesn't have any operand, hence, no regs involved */
if (insn->opcode == JIT_OP_FENCE) {
continue;
}
#endif
JitRegVec regvec = jit_insn_opnd_regs(insn);
unsigned i;
JitReg *regp;
@ -737,6 +744,13 @@ allocate_for_basic_block(RegallocContext *rc, JitBasicBlock *basic_block,
JIT_FOREACH_INSN_REVERSE(basic_block, insn)
{
#if WASM_ENABLE_SHARED_MEMORY != 0
/* fence insn doesn't have any operand, hence, no regs involved */
if (insn->opcode == JIT_OP_FENCE) {
continue;
}
#endif
JitRegVec regvec = jit_insn_opnd_regs(insn);
unsigned first_use = jit_insn_opnd_first_use(insn);
unsigned i;