This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH 187/236] duplicate_insn_chain accepts rtx_insn


gcc/
	* rtl.h (duplicate_insn_chain): Strengthen both params from rtx to rtx_insn *.
	* cfgrtl.c (duplicate_insn_chain): Strengthen params "from", "to"
	and locals "insn", "next", "copy" from rtx to rtx_insn *.  Remove
	now-redundant checked cast.
---
 gcc/cfgrtl.c | 6 +++---
 gcc/rtl.h    | 2 +-
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index ee55788..de31e8f 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -4085,9 +4085,9 @@ cfg_layout_can_duplicate_bb_p (const_basic_block bb)
 }
 
 rtx_insn *
-duplicate_insn_chain (rtx from, rtx to)
+duplicate_insn_chain (rtx_insn *from, rtx_insn *to)
 {
-  rtx insn, next, copy;
+  rtx_insn *insn, *next, *copy;
   rtx_note *last;
 
   /* Avoid updating of boundaries of previous basic block.  The
@@ -4170,7 +4170,7 @@ duplicate_insn_chain (rtx from, rtx to)
     }
   insn = NEXT_INSN (last);
   delete_insn (last);
-  return as_a_nullable <rtx_insn *> (insn);
+  return insn;
 }
 
 /* Create a duplicate of the basic block BB.  */
diff --git a/gcc/rtl.h b/gcc/rtl.h
index cda76cd..4505b07 100644
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -3173,7 +3173,7 @@ extern int fixup_args_size_notes (rtx, rtx, int);
 
 /* In cfgrtl.c */
 extern void print_rtl_with_bb (FILE *, const_rtx, int);
-extern rtx_insn *duplicate_insn_chain (rtx, rtx);
+extern rtx_insn *duplicate_insn_chain (rtx_insn *, rtx_insn *);
 
 /* In expmed.c */
 extern void init_expmed (void);
-- 
1.8.5.3


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]