let get_kf_fi proj kf = 
  let fct_var = Kernel_function.get_vi kf in
  try
    let fi = Cilutil.VarinfoHashtbl.find proj.T.functions fct_var in fi
  with Not_found -> 
    let fi_def, is_def = 
      try let def = Kernel_function.get_definition kf in Some def, true
      with Kernel_function.No_Definition -> Nonefalse
    in
    let new_fi = { 
      T.fi_kf = kf;
      T.fi_def = fi_def;
      T.fi_project = proj;
      T.fi_top = None;
      T.fi_level_option = get_default_level_option is_def;
      T.fi_init_marks = None ; 
      T.fi_slices = [] ; 
      T.fi_next_ff_num = 1; 
      T.f_called_by = [] }
    in
      Cilutil.VarinfoHashtbl.add proj.T.functions fct_var new_fi;
      new_fi