def find_phis(func):
    """Map blocks to phis found in the block"""
    phis = {}
    for block in func.blocks:
        phis[block] = []
        for op in block.leaders:
            if op.opcode == 'phi':
                phis[block].append(op)
    return phis
