cranelift: tweak condition in safepoint detection to check for resumable traps;
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
use crate::cursor::{Cursor, FuncCursor};
|
||||
use crate::dominator_tree::DominatorTree;
|
||||
use crate::ir::{Function, InstBuilder, InstructionData, Opcode, TrapCode};
|
||||
use crate::ir::{Function, InstBuilder, Opcode};
|
||||
use crate::isa::TargetIsa;
|
||||
use crate::regalloc::live_value_tracker::LiveValueTracker;
|
||||
use crate::regalloc::liveness::Liveness;
|
||||
@@ -51,11 +51,7 @@ pub fn emit_stackmaps(
|
||||
pos.goto_top(block);
|
||||
|
||||
while let Some(inst) = pos.next_inst() {
|
||||
if let InstructionData::Trap {
|
||||
code: TrapCode::Interrupt,
|
||||
..
|
||||
} = &pos.func.dfg[inst]
|
||||
{
|
||||
if pos.func.dfg[inst].opcode().is_resumable_trap() {
|
||||
insert_and_encode_safepoint(&mut pos, tracker, isa);
|
||||
} else if pos.func.dfg[inst].opcode().is_call() {
|
||||
insert_and_encode_safepoint(&mut pos, tracker, isa);
|
||||
|
||||
Reference in New Issue
Block a user