Use opcode's is_return() rather than pattern-matching.

This commit is contained in:
Tyler McMullen
2017-12-02 15:45:47 -08:00
committed by Jakob Stoklund Olesen
parent a26d438b30
commit 66eccb7859

View File

@@ -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);
}
}
}