set unreachable instruction at the end of function
insert unreachable instruction iff the last instruction is not a terminator