*参照元 [#eccb1260]
#backlinks

*説明 [#zc6743cc]
-パス: [[gcc-8.3/gcc/ira.c]]

-FIXME: これは何?
--説明


**引数 [#edf61e8b]
-なし


**返り値 [#k2643966]
-なし


**参考 [#b4b33ad6]


*実装 [#me0992e9]
 static void
 do_reload (void)
 {
   basic_block bb;
   bool need_dce;
   unsigned pic_offset_table_regno = INVALID_REGNUM;
 
-
--[[gcc-8.3/gcc/basic_block]]

   if (flag_ira_verbose < 10)
     ira_dump_file = dump_file;
 
-
--[[gcc-8.3/gcc/ira_dump_file(global)]]
--[[gcc-8.3/gcc/dump_file(global)]]

   /* If pic_offset_table_rtx is a pseudo register, then keep it so
      after reload to avoid possible wrong usages of hard reg assigned
      to it.  */
   if (pic_offset_table_rtx
       && REGNO (pic_offset_table_rtx) >= FIRST_PSEUDO_REGISTER)
     pic_offset_table_regno = REGNO (pic_offset_table_rtx);
 
-
--[[gcc-8.3/gcc/REG_NO()]]

   timevar_push (TV_RELOAD);
   if (ira_use_lra_p)
     {
       if (current_loops != NULL)
 	{
 	  loop_optimizer_finalize ();
 	  free_dominance_info (CDI_DOMINATORS);
 	}
       FOR_ALL_BB_FN (bb, cfun)
 	bb->loop_father = NULL;
       current_loops = NULL;
 
       ira_destroy ();
 
       lra (ira_dump_file);
       /* ???!!! Move it before lra () when we use ira_reg_equiv in
 	 LRA.  */
       vec_free (reg_equivs);
       reg_equivs = NULL;
       need_dce = false;
     }
-
--[[gcc-8.3/gcc/timevar_push()]]
--[[gcc-8.3/gcc/loop_optimizer_finalize()]]
--[[gcc-8.3/gcc/free_dominance_info()]]
--[[gcc-8.3/gcc/FOR_ALL_BB_FN()]]
--[[gcc-8.3/gcc/ira_destroy()]]
--[[gcc-8.3/gcc/lra()]]

   else
     {
       df_set_flags (DF_NO_INSN_RESCAN);
       build_insn_chain ();
 
       need_dce = reload (get_insns (), ira_conflicts_p);
     }
 
-
--[[gcc-8.3/gcc/df_set_flags()]]
--[[gcc-8.3/gcc/build_insn_chain()]]
--[[gcc-8.3/gcc/reload()]]
--[[gcc-8.3/gcc/get_insns()]]

   timevar_pop (TV_RELOAD);
 
   timevar_push (TV_IRA);
 
   if (ira_conflicts_p && ! ira_use_lra_p)
     {
       ira_free (ira_spilled_reg_stack_slots);
       ira_finish_assign ();
     }
 
-
--[[gcc-8.3/gcc/timevar_pop()]]
--[[gcc-8.3/gcc/timevar_push()]]
--[[gcc-8.3/gcc/ira_free()]]
--[[gcc-8.3/gcc/ira_finish_assign()]]

   if (internal_flag_ira_verbose > 0 && ira_dump_file != NULL
       && overall_cost_before != ira_overall_cost)
     fprintf (ira_dump_file, "+++Overall after reload %" PRId64 "\n",
 	     ira_overall_cost);
 
   flag_ira_share_spill_slots = saved_flag_ira_share_spill_slots;
 
   if (! ira_use_lra_p)
     {
       ira_destroy ();
       if (current_loops != NULL)
 	{
 	  loop_optimizer_finalize ();
 	  free_dominance_info (CDI_DOMINATORS);
 	}
       FOR_ALL_BB_FN (bb, cfun)
 	bb->loop_father = NULL;
       current_loops = NULL;
       
       regstat_free_ri ();
       regstat_free_n_sets_and_refs ();
     }
 
-
--[[gcc-8.3/gcc/ira_destroy()]]
--[[gcc-8.3/gcc/loop_optimizer_finalize()]]
--[[gcc-8.3/gcc/free_dominance_info()]]
--[[gcc-8.3/gcc/FOR_ALL_BB_FN()]]
--[[gcc-8.3/gcc/regstat_free_ri()]]
--[[gcc-8.3/gcc/regstat_free_n_sets_and_refs()]]

   if (optimize)
     cleanup_cfg (CLEANUP_EXPENSIVE);
 
   finish_reg_equiv ();
 
   bitmap_obstack_release (&ira_bitmap_obstack);
 #ifndef IRA_NO_OBSTACK
   obstack_free (&ira_obstack, NULL);
 #endif
 
-
--[[gcc-8.3/gcc/cleanup_cfg()]]
--[[gcc-8.3/gcc/finish_reg_equiv()]]
--[[gcc-8.3/gcc/bitmap_obstack_release()]]
--[[gcc-8.3/gcc/obstack_free()]]

   /* The code after the reload has changed so much that at this point
      we might as well just rescan everything.  Note that
      df_rescan_all_insns is not going to help here because it does not
      touch the artificial uses and defs.  */
   df_finish_pass (true);
   df_scan_alloc (NULL);
   df_scan_blocks ();
 
-
--[[gcc-8.3/gcc/df_finish_pass()]]
--[[gcc-8.3/gcc/df_scan_alloc()]]
--[[gcc-8.3/gcc/df_scan_blocks()]]

   if (optimize > 1)
     {
       df_live_add_problem ();
       df_live_set_all_dirty ();
     }
 
   if (optimize)
     df_analyze ();
 
   if (need_dce && optimize)
     run_fast_dce ();
 
-
--[[gcc-8.3/gcc/df_live_add_problem()]]
--[[gcc-8.3/gcc/df_live_set_all_dirty()]]
--[[gcc-8.3/gcc/df_analyze()]]
--[[gcc-8.3/gcc/run_fast_dce()]]

   /* Diagnose uses of the hard frame pointer when it is used as a global
      register.  Often we can get away with letting the user appropriate
      the frame pointer, but we should let them know when code generation
      makes that impossible.  */
   if (global_regs[HARD_FRAME_POINTER_REGNUM] && frame_pointer_needed)
     {
       tree decl = global_regs_decl[HARD_FRAME_POINTER_REGNUM];
       error_at (DECL_SOURCE_LOCATION (current_function_decl),
                 "frame pointer required, but reserved");
       inform (DECL_SOURCE_LOCATION (decl), "for %qD", decl);
     }
 
-
--[[gcc-8.3/gcc/DECL_SOURCE_LOCATION()]]
--[[gcc-8.3/gcc/error_at()]]
--[[gcc-8.3/gcc/inform()]]

   /* If we are doing generic stack checking, give a warning if this
      function's frame size is larger than we expect.  */
   if (flag_stack_check == GENERIC_STACK_CHECK)
     {
       poly_int64 size = get_frame_size () + STACK_CHECK_FIXED_FRAME_SIZE;
 
       for (int i = 0; i < FIRST_PSEUDO_REGISTER; i++)
 	if (df_regs_ever_live_p (i) && !fixed_regs[i] && call_used_regs[i])
 	  size += UNITS_PER_WORD;
 
       if (constant_lower_bound (size) > STACK_CHECK_MAX_FRAME_SIZE)
 	warning (0, "frame size too large for reliable stack checking");
     }
 
   if (pic_offset_table_regno != INVALID_REGNUM)
     pic_offset_table_rtx = gen_rtx_REG (Pmode, pic_offset_table_regno);
 
   timevar_pop (TV_IRA);
 }
-
--[[gcc-8.3/gcc/poly_int64]]
--[[gcc-8.3/gcc/get_frame_size()]]
--[[gcc-8.3/gcc/df_regs_ever_live_p()]]
--[[gcc-8.3/gcc/constant_lower_bound()]]
--[[gcc-8.3/gcc/warning()]]
--[[gcc-8.3/gcc/gen_rtx_REG()]]


*コメント [#e3c51cf5]


トップ   編集 差分 履歴 添付 複製 名前変更 リロード   新規 一覧 検索 最終更新   ヘルプ   最終更新のRSS