diff mbox

[038/236] find_first_parameter_load returns an rtx_insn

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

Commit Message

David Malcolm Aug. 6, 2014, 5:20 p.m. UTC
gcc/
	* rtl.h (find_first_parameter_load): Strengthen return type from
	rtx to rtx_insn *.
	* rtlanal.c (find_first_parameter_load): Strengthen return type
	from rtx to rtx_insn *.  Add checked cast for now, to postpone
	strengthening the params.
---
 gcc/rtl.h     | 2 +-
 gcc/rtlanal.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

Comments

Jeff Law Aug. 13, 2014, 6:01 p.m. UTC | #1
On 08/06/14 11:20, David Malcolm wrote:
> gcc/
> 	* rtl.h (find_first_parameter_load): Strengthen return type from
> 	rtx to rtx_insn *.
> 	* rtlanal.c (find_first_parameter_load): Strengthen return type
> 	from rtx to rtx_insn *.  Add checked cast for now, to postpone
> 	strengthening the params.
OK.
jeff
David Malcolm Aug. 21, 2014, 12:57 a.m. UTC | #2
On Wed, 2014-08-13 at 12:01 -0600, Jeff Law wrote:
> On 08/06/14 11:20, David Malcolm wrote:
> > gcc/
> > 	* rtl.h (find_first_parameter_load): Strengthen return type from
> > 	rtx to rtx_insn *.
> > 	* rtlanal.c (find_first_parameter_load): Strengthen return type
> > 	from rtx to rtx_insn *.  Add checked cast for now, to postpone
> > 	strengthening the params.
> OK.

Thanks; committed to trunk as r214251, with trivial as_a_nullable ->
safe_as_a fixup.
diff mbox

Patch

diff --git a/gcc/rtl.h b/gcc/rtl.h
index 2cce7d4..a97a81e 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -2617,7 +2617,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 *);
 extern int loc_mentioned_in_p (rtx *, const_rtx);
-extern rtx find_first_parameter_load (rtx, rtx);
+extern rtx_insn *find_first_parameter_load (rtx, rtx);
 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 d62f44b..493c812 100644
--- a/gcc/rtlanal.c
+++ b/gcc/rtlanal.c
@@ -3684,7 +3684,7 @@  parms_set (rtx x, const_rtx pat ATTRIBUTE_UNUSED, void *data)
    found if CSE has eliminated some of them (e.g., an argument
    to the outer function is passed down as a parameter).
    Do not skip BOUNDARY.  */
-rtx
+rtx_insn *
 find_first_parameter_load (rtx call_insn, rtx boundary)
 {
   struct parms_set_data parm;
@@ -3746,7 +3746,7 @@  find_first_parameter_load (rtx call_insn, rtx boundary)
 	    break;
 	}
     }
-  return first_set;
+  return as_a_nullable <rtx_insn *> (first_set);
 }
 
 /* Return true if we should avoid inserting code between INSN and preceding