let find_stmt_node cfg stmt =
  let find n = match node_stmt_opt n with None -> ()
    | Some s -> if s.sid = stmt.sid then raise (Found n)
  in
    try (iter_nodes find cfg; raise Not_found)
    with Found n -> n