diff mbox

[028/236] cfgexpand.c: Use rtx_insn

Message ID 1407345815-14551-29-git-send-email-dmalcolm@redhat.com
State New
Headers show

Commit Message

David Malcolm Aug. 6, 2014, 5:20 p.m. UTC
gcc/
	* cfgexpand.c (expand_used_vars): Strengthen return type from rtx
	to rtx_insn *; also for local "var_end_seq".
	(maybe_dump_rtl_for_gimple_stmt): Likewise for param "since".
	(maybe_cleanup_end_of_block): Likewise for param "last" and local
	"insn".
	(expand_gimple_cond): Likewise for locals "last2" and "last".
	(mark_transaction_restart_calls): Likewise for local "insn".
	(expand_gimple_stmt): Likewise for return type and locals "last"
	and "insn".
	(expand_gimple_tailcall): Likewise for locals "last2" and "last".
	(avoid_complex_debug_insns): Likewise for param "insn".
	(expand_debug_locations): Likewise for locals "insn", "last",
	"prev_insn" and "insn2".
	(expand_gimple_basic_block): Likewise for local "last".
	(construct_exit_block): Likewise for locals "head", "end",
	"orig_end".
	(pass_expand::execute): Likewise for locals "var_seq",
	"var_ret_seq", "next".
---
 gcc/cfgexpand.c | 44 +++++++++++++++++++++++---------------------
 1 file changed, 23 insertions(+), 21 deletions(-)

Comments

Jeff Law Aug. 13, 2014, 1:42 p.m. UTC | #1
On 08/06/14 11:20, David Malcolm wrote:
> gcc/
> 	* cfgexpand.c (expand_used_vars): Strengthen return type from rtx
> 	to rtx_insn *; also for local "var_end_seq".
> 	(maybe_dump_rtl_for_gimple_stmt): Likewise for param "since".
> 	(maybe_cleanup_end_of_block): Likewise for param "last" and local
> 	"insn".
> 	(expand_gimple_cond): Likewise for locals "last2" and "last".
> 	(mark_transaction_restart_calls): Likewise for local "insn".
> 	(expand_gimple_stmt): Likewise for return type and locals "last"
> 	and "insn".
> 	(expand_gimple_tailcall): Likewise for locals "last2" and "last".
> 	(avoid_complex_debug_insns): Likewise for param "insn".
> 	(expand_debug_locations): Likewise for locals "insn", "last",
> 	"prev_insn" and "insn2".
> 	(expand_gimple_basic_block): Likewise for local "last".
> 	(construct_exit_block): Likewise for locals "head", "end",
> 	"orig_end".
> 	(pass_expand::execute): Likewise for locals "var_seq",
> 	"var_ret_seq", "next".
OK.
Jeff
David Malcolm Aug. 19, 2014, 7:50 p.m. UTC | #2
On Wed, 2014-08-13 at 07:42 -0600, Jeff Law wrote:
> On 08/06/14 11:20, David Malcolm wrote:
> > gcc/
> > 	* cfgexpand.c (expand_used_vars): Strengthen return type from rtx
> > 	to rtx_insn *; also for local "var_end_seq".
> > 	(maybe_dump_rtl_for_gimple_stmt): Likewise for param "since".
> > 	(maybe_cleanup_end_of_block): Likewise for param "last" and local
> > 	"insn".
> > 	(expand_gimple_cond): Likewise for locals "last2" and "last".
> > 	(mark_transaction_restart_calls): Likewise for local "insn".
> > 	(expand_gimple_stmt): Likewise for return type and locals "last"
> > 	and "insn".
> > 	(expand_gimple_tailcall): Likewise for locals "last2" and "last".
> > 	(avoid_complex_debug_insns): Likewise for param "insn".
> > 	(expand_debug_locations): Likewise for locals "insn", "last",
> > 	"prev_insn" and "insn2".
> > 	(expand_gimple_basic_block): Likewise for local "last".
> > 	(construct_exit_block): Likewise for locals "head", "end",
> > 	"orig_end".
> > 	(pass_expand::execute): Likewise for locals "var_seq",
> > 	"var_ret_seq", "next".
> OK.

Thanks.  Committed to trunk as r214190.
diff mbox

Patch

diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index df52c08..643bb19 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1659,12 +1659,12 @@  stack_protect_return_slot_p ()
 
 /* Expand all variables used in the function.  */
 
-static rtx
+static rtx_insn *
 expand_used_vars (void)
 {
   tree var, outer_block = DECL_INITIAL (current_function_decl);
   vec<tree> maybe_local_decls = vNULL;
-  rtx var_end_seq = NULL_RTX;
+  rtx_insn *var_end_seq = NULL;
   struct pointer_map_t *ssa_name_decls;
   unsigned i;
   unsigned len;
@@ -1941,7 +1941,7 @@  expand_used_vars (void)
    generated for STMT should have been appended.  */
 
 static void
-maybe_dump_rtl_for_gimple_stmt (gimple stmt, rtx since)
+maybe_dump_rtl_for_gimple_stmt (gimple stmt, rtx_insn *since)
 {
   if (dump_file && (dump_flags & TDF_DETAILS))
     {
@@ -2002,7 +2002,7 @@  label_rtx_for_bb (basic_block bb ATTRIBUTE_UNUSED)
    last instruction before the just emitted jump sequence.  */
 
 static void
-maybe_cleanup_end_of_block (edge e, rtx last)
+maybe_cleanup_end_of_block (edge e, rtx_insn *last)
 {
   /* Special case: when jumpif decides that the condition is
      trivial it emits an unconditional jump (and the necessary
@@ -2017,7 +2017,7 @@  maybe_cleanup_end_of_block (edge e, rtx last)
      normally isn't there in a cleaned CFG), fix it here.  */
   if (BARRIER_P (get_last_insn ()))
     {
-      rtx insn;
+      rtx_insn *insn;
       remove_edge (e);
       /* Now, we have a single successor block, if we have insns to
 	 insert on the remaining edge we potentially will insert
@@ -2059,7 +2059,7 @@  expand_gimple_cond (basic_block bb, gimple stmt)
   edge new_edge;
   edge true_edge;
   edge false_edge;
-  rtx last2, last;
+  rtx_insn *last2, *last;
   enum tree_code code;
   tree op0, op1;
 
@@ -2206,7 +2206,7 @@  mark_transaction_restart_calls (gimple stmt)
     {
       struct tm_restart_node *n = (struct tm_restart_node *) *slot;
       tree list = n->label_or_list;
-      rtx insn;
+      rtx_insn *insn;
 
       for (insn = next_real_insn (get_last_insn ());
 	   !CALL_P (insn);
@@ -3335,11 +3335,11 @@  expand_gimple_stmt_1 (gimple stmt)
    sets REG_EH_REGION notes if necessary and sets the current source
    location for diagnostics.  */
 
-static rtx
+static rtx_insn *
 expand_gimple_stmt (gimple stmt)
 {
   location_t saved_location = input_location;
-  rtx last = get_last_insn ();
+  rtx_insn *last = get_last_insn ();
   int lp_nr;
 
   gcc_assert (cfun);
@@ -3362,7 +3362,7 @@  expand_gimple_stmt (gimple stmt)
   lp_nr = lookup_stmt_eh_lp (stmt);
   if (lp_nr)
     {
-      rtx insn;
+      rtx_insn *insn;
       for (insn = next_real_insn (last); insn;
 	   insn = next_real_insn (insn))
 	{
@@ -3392,7 +3392,7 @@  expand_gimple_stmt (gimple stmt)
 static basic_block
 expand_gimple_tailcall (basic_block bb, gimple stmt, bool *can_fallthru)
 {
-  rtx last2, last;
+  rtx_insn *last2, *last;
   edge e;
   edge_iterator ei;
   int probability;
@@ -4767,7 +4767,7 @@  expand_debug_source_expr (tree exp)
    deeper than that, create DEBUG_EXPRs and emit DEBUG_INSNs before INSN.  */
 
 static void
-avoid_complex_debug_insns (rtx insn, rtx *exp_p, int depth)
+avoid_complex_debug_insns (rtx_insn *insn, rtx *exp_p, int depth)
 {
   rtx exp = *exp_p;
 
@@ -4819,8 +4819,8 @@  avoid_complex_debug_insns (rtx insn, rtx *exp_p, int depth)
 static void
 expand_debug_locations (void)
 {
-  rtx insn;
-  rtx last = get_last_insn ();
+  rtx_insn *insn;
+  rtx_insn *last = get_last_insn ();
   int save_strict_alias = flag_strict_aliasing;
 
   /* New alias sets while setting up memory attributes cause
@@ -4832,7 +4832,8 @@  expand_debug_locations (void)
     if (DEBUG_INSN_P (insn))
       {
 	tree value = (tree)INSN_VAR_LOCATION_LOC (insn);
-	rtx val, prev_insn, insn2;
+	rtx val;
+	rtx_insn *prev_insn, *insn2;
 	enum machine_mode mode;
 
 	if (value == NULL_TREE)
@@ -4877,7 +4878,8 @@  expand_gimple_basic_block (basic_block bb, bool disable_tail_calls)
   gimple_stmt_iterator gsi;
   gimple_seq stmts;
   gimple stmt = NULL;
-  rtx note, last;
+  rtx note;
+  rtx_insn *last;
   edge e;
   edge_iterator ei;
   rtx *elt;
@@ -5311,14 +5313,14 @@  set_block_levels (tree block, int level)
 static void
 construct_exit_block (void)
 {
-  rtx head = get_last_insn ();
-  rtx end;
+  rtx_insn *head = get_last_insn ();
+  rtx_insn *end;
   basic_block exit_block;
   edge e, e2;
   unsigned ix;
   edge_iterator ei;
   basic_block prev_bb = EXIT_BLOCK_PTR_FOR_FN (cfun)->prev_bb;
-  rtx orig_end = BB_END (prev_bb);
+  rtx_insn *orig_end = BB_END (prev_bb);
 
   rtl_profile_for_bb (EXIT_BLOCK_PTR_FOR_FN (cfun));
 
@@ -5613,7 +5615,7 @@  pass_expand::execute (function *fun)
   sbitmap blocks;
   edge_iterator ei;
   edge e;
-  rtx var_seq, var_ret_seq;
+  rtx_insn *var_seq, *var_ret_seq;
   unsigned i;
 
   timevar_push (TV_OUT_OF_SSA);
@@ -5832,7 +5834,7 @@  pass_expand::execute (function *fun)
   if (var_ret_seq)
     {
       rtx after = return_label;
-      rtx next = NEXT_INSN (after);
+      rtx_insn *next = NEXT_INSN (after);
       if (next && NOTE_INSN_BASIC_BLOCK_P (next))
 	after = next;
       emit_insn_after (var_ret_seq, after);