def compute_live_map(cfg, blocks, var_use_map, var_def_map):
 live_map = {}
 for offset in blocks.keys():
  live_map[offset] = var_use_map[offset]
 def fix_point_progress():
  return tuple((len(v) for v in live_map.values()))
 old_point = None
 new_point = fix_point_progress()
 while (old_point != new_point):
  for offset in live_map.keys():
   for (inc_blk, _data) in cfg.predecessors(offset):
    live_map[inc_blk] |= (live_map[offset] - var_def_map[inc_blk])
  old_point = new_point
  new_point = fix_point_progress()
 return live_map

def compute_live_map ( cfg , blocks , var_use_map , var_def_map ) : live_map = { } for offset in blocks . keys ( ) : live_map [ offset ] = var_use_map [ offset ] def fix_point_progress ( ) : return tuple ( ( len ( v ) for v in live_map . values ( ) ) ) old_point = None new_point = fix_point_progress ( ) while ( old_point != new_point ) : for offset in live_map . keys ( ) : for ( inc_blk , _data ) in cfg . predecessors ( offset ) : live_map [ inc_blk ] |= ( live_map [ offset ] - var_def_map [ inc_blk ] ) old_point = new_point new_point = fix_point_progress ( ) return live_map
find variables that must be alive at the entry of each block .