diff options
author | Max Bernstein <[email protected]> | 2025-05-20 18:41:37 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2025-05-20 15:41:37 -0700 |
commit | b08e20d34afb1cb99eeb97b4b7330290556511d3 (patch) | |
tree | c076a61a70a631bd39393cf171073725025e7db2 /zjit/src/codegen.rs | |
parent | b043abc048e74d5f3fdca37395457e6f24abbe55 (diff) |
ZJIT: Allow DCE to remove some CCalls (#13363)
Allow DCE to remove some CCalls
Add `elidable` field that signals that there would be no discernible
effect if the call to the method were removed. The default is false.
Notes
Notes:
Merged-By: k0kubun <[email protected]>
Diffstat (limited to 'zjit/src/codegen.rs')
-rw-r--r-- | zjit/src/codegen.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/zjit/src/codegen.rs b/zjit/src/codegen.rs index 24dbd30e70..844ac5df42 100644 --- a/zjit/src/codegen.rs +++ b/zjit/src/codegen.rs @@ -273,7 +273,7 @@ fn gen_insn(cb: &mut CodeBlock, jit: &mut JITState, asm: &mut Assembler, functio Insn::GuardType { val, guard_type, state } => gen_guard_type(asm, opnd!(val), *guard_type, &function.frame_state(*state))?, Insn::GuardBitEquals { val, expected, state } => gen_guard_bit_equals(asm, opnd!(val), *expected, &function.frame_state(*state))?, Insn::PatchPoint(_) => return Some(()), // For now, rb_zjit_bop_redefined() panics. TODO: leave a patch point and fix rb_zjit_bop_redefined() - Insn::CCall { cfun, args, name: _, return_type: _ } => gen_ccall(jit, asm, *cfun, args)?, + Insn::CCall { cfun, args, name: _, return_type: _, elidable: _ } => gen_ccall(jit, asm, *cfun, args)?, _ => { debug!("ZJIT: gen_function: unexpected insn {:?}", insn); return None; |