'Remove assignments to unused temporary variables from the
current block.'

def _remove_unused_temporaries(self):

    new_body = []
    for inst in self.current_block.body:
        if (isinstance(inst, ir.Assign) and inst.target.is_temp and (inst.target.name in self.assigner.unused_dests)):
            continue
        new_body.append(inst)
    self.current_block.body = new_body
