Use opcode's is_return() rather than pattern-matching.
This commit is contained in:
committed by
Jakob Stoklund Olesen
parent
a26d438b30
commit
66eccb7859
@@ -208,12 +208,9 @@ impl TargetIsa for Isa {
|
||||
let mut return_insts = Vec::new();
|
||||
for ebb in func.layout.ebbs() {
|
||||
for inst in func.layout.ebb_insts(ebb) {
|
||||
if let InstructionData::MultiAry { opcode, .. } = func.dfg[inst] {
|
||||
if opcode == Opcode::Return {
|
||||
return_insts.push(inst);
|
||||
}
|
||||
if func.dfg[inst].opcode().is_return() {
|
||||
return_insts.push(inst);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user