def register_sizes(regs, in_sizes):
 sizes = {}
 bigger = {}
 smaller = {}
 for l in regs:
  for (r, s) in zip(l, in_sizes):
   sizes[r] = s
  for r in l:
   bigger[r] = [r_ for r_ in l if ((sizes[r_] > sizes[r]) or (r == r_))]
   smaller[r] = [r_ for r_ in l if (sizes[r_] < sizes[r])]
 return (lists.concat(regs), sizes, bigger, smaller)

def register_sizes ( regs , in_sizes ) : sizes = { } bigger = { } smaller = { } for l in regs : for ( r , s ) in zip ( l , in_sizes ) : sizes [ r ] = s for r in l : bigger [ r ] = [ r_ for r_ in l if ( ( sizes [ r_ ] > sizes [ r ] ) or ( r == r_ ) ) ] smaller [ r ] = [ r_ for r_ in l if ( sizes [ r_ ] < sizes [ r ] ) ] return ( lists . concat ( regs ) , sizes , bigger , smaller )
create dictionaries over register sizes and relations given a list of lists of overlapping register names and a list of input sizes .