diff mbox

[227/236] find_first_parameter_load params and return type

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

Commit Message

David Malcolm Aug. 6, 2014, 5:23 p.m. UTC
gcc/
	* rtl.h (find_first_parameter_load): Strengthen return type and
	both params from rtx to rtx_insn *.
	* rtlanal.c (find_first_parameter_load): Strengthen return type,
	both params and locals "before", "first_set" from rtx to
	rtx_insn *.  Remove now-redundant cast.
	* except.c (sjlj_mark_call_sites): Use NULL rather than NULL_RTX.
---
 gcc/except.c  | 2 +-
 gcc/rtl.h     | 2 +-
 gcc/rtlanal.c | 7 ++++---
 3 files changed, 6 insertions(+), 5 deletions(-)
diff mbox

Patch

diff --git a/gcc/except.c b/gcc/except.c
index d44c027..13df541 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1164,7 +1164,7 @@  sjlj_mark_call_sites (void)
       /* Don't separate a call from it's argument loads.  */
       before = insn;
       if (CALL_P (insn))
-	before = find_first_parameter_load (insn, NULL_RTX);
+	before = find_first_parameter_load (insn, NULL);
 
       start_sequence ();
       mem = adjust_address (crtl->eh.sjlj_fc, TYPE_MODE (integer_type_node),
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 8cdb88d..8f8d7f0 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2820,7 +2820,7 @@  extern int auto_inc_p (const_rtx);
 extern int in_expr_list_p (const_rtx, const_rtx);
 extern void remove_node_from_expr_list (const_rtx, rtx_expr_list **);
 extern int loc_mentioned_in_p (rtx *, const_rtx);
-extern rtx_insn *find_first_parameter_load (rtx, rtx);
+extern rtx_insn *find_first_parameter_load (rtx_insn *, rtx_insn *);
 extern bool keep_with_call_p (const_rtx);
 extern bool label_is_jump_target_p (const_rtx, const_rtx);
 extern int insn_rtx_cost (rtx, bool);
diff --git a/gcc/rtlanal.c b/gcc/rtlanal.c
index 6429906..df2f734 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -3639,10 +3639,11 @@  parms_set (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
    to the outer function is passed down as a parameter).
    Do not skip BOUNDARY.  */
 rtx_insn *
-find_first_parameter_load (rtx call_insn, rtx boundary)
+find_first_parameter_load (rtx_insn *call_insn, rtx_insn *boundary)
 {
   struct parms_set_data parm;
-  rtx p, before, first_set;
+  rtx p;
+  rtx_insn *before, *first_set;
 
   /* Since different machines initialize their parameter registers
      in different orders, assume nothing.  Collect the set of all
@@ -3700,7 +3701,7 @@  find_first_parameter_load (rtx call_insn, rtx boundary)
 	    break;
 	}
     }
-  return as_a_nullable <rtx_insn *> (first_set);
+  return first_set;
 }
 
 /* Return true if we should avoid inserting code between INSN and preceding