let var_to_loc var =
  Locations.valid_enumerate_bits (Locations.loc_of_varinfo var)