strength_continue,
strength_break,
strength_return,
- strength_discard
};
struct block_record
virtual void visit(class ir_discard * ir)
{
- truncate_after_instruction(ir);
- this->block.min_strength = strength_discard;
}
enum jump_strength get_jump_strength(ir_instruction* ir)
return strength_continue;
} else if(ir->ir_type == ir_type_return)
return strength_return;
- else if(ir->ir_type == ir_type_discard)
- return strength_discard;
else
return strength_none;
}
else
lower = lower_sub_return;
break;
- case strength_discard:
- lower = false; /* probably nothing needs this lowered */
- break;
}
return lower;
}
/* FINISHME: unify returns with identical expressions */
else if(jump_strengths[0] == strength_return && this->function.signature->return_type->is_void())
ir->insert_after(new(ir) ir_return(NULL));
- /* FINISHME: unify discards */
- else
- unify = false;
+ else
+ unify = false;
if(unify) {
jumps[0]->remove();