let verify_unmodified uses fdefs curiosh defiosh =
  UD.VS.fold (fun vi b ->
    let curido = RD.iosh_singleton_lookup curiosh vi in
    let defido = RD.iosh_singleton_lookup defiosh vi in
    match curido, defido with
      Some(curid), Some(defid) ->
        (if !debug then (Cilmsg.debug "verify_unmodified: curido: %d defido: %d" curid defid);
         curid = defid && b)
    | NoneNone ->
        if not(UD.VS.mem vi fdefs) then
          (if !debug then (Cilmsg.debug "verify_unmodified: %s not defined in function" vi.vname);
           b)
        else (* if the same set of definitions reaches, we can replace, also *)
          let curios = try IH.find curiosh vi.vid
          with Not_found -> RD.IOS.empty in
          let defios = try IH.find defiosh vi.vid
          with Not_found -> RD.IOS.empty in
          RD.IOS.compare curios defios == 0 && b
    | _, _ ->
        (if !debug then Cilmsg.debug "verify_unmodified: %s has conflicting definitions. cur: %a\n def: %a"
           vi.vname RD.ReachingDef.pretty ((),0,curiosh)
           RD.ReachingDef.pretty ((),0,defiosh);
         false))
    uses true