Commit 61216c26 by Steven Bosscher

rtl.h (next_label, [...]): Remove prototypes.


	* rtl.h (next_label, skip_consecutive_labels, link_cc0_insns):
	Remove prototypes.
	* emit-rtl.c (next_label): Remove unused function.
	(skip_consecutive_labels, link_cc0_insns): Move to ...
	* reorg.c (skip_consecutive_labels, link_cc0_insns): ... here, the
	only place where these functions are used, and make them static.

From-SVN: r198894
parent 418d1b87
2013-05-14 Steven Bosscher <steven@gcc.gnu.org>
* rtl.h (next_label, skip_consecutive_labels, link_cc0_insns):
Remove prototypes.
* emit-rtl.c (next_label): Remove unused function.
(skip_consecutive_labels, link_cc0_insns): Move to ...
* reorg.c (skip_consecutive_labels, link_cc0_insns): ... here, the
only place where these functions are used, and make them static.
2013-05-14 Marc Glisse <marc.glisse@inria.fr> 2013-05-14 Marc Glisse <marc.glisse@inria.fr>
* fold-const.c (fold_negate_expr): Handle vectors. * fold-const.c (fold_negate_expr): Handle vectors.
......
...@@ -3332,56 +3332,8 @@ prev_active_insn (rtx insn) ...@@ -3332,56 +3332,8 @@ prev_active_insn (rtx insn)
return insn; return insn;
} }
/* Return the next CODE_LABEL after the insn INSN, or 0 if there is none. */
rtx
next_label (rtx insn)
{
while (insn)
{
insn = NEXT_INSN (insn);
if (insn == 0 || LABEL_P (insn))
break;
}
return insn;
}
/* Return the last label to mark the same position as LABEL. Return LABEL
itself if it is null or any return rtx. */
rtx
skip_consecutive_labels (rtx label)
{
rtx insn;
if (label && ANY_RETURN_P (label))
return label;
for (insn = label; insn != 0 && !INSN_P (insn); insn = NEXT_INSN (insn))
if (LABEL_P (insn))
label = insn;
return label;
}
#ifdef HAVE_cc0 #ifdef HAVE_cc0
/* INSN uses CC0 and is being moved into a delay slot. Set up REG_CC_SETTER
and REG_CC_USER notes so we can find it. */
void
link_cc0_insns (rtx insn)
{
rtx user = next_nonnote_insn (insn);
if (NONJUMP_INSN_P (user) && GET_CODE (PATTERN (user)) == SEQUENCE)
user = XVECEXP (PATTERN (user), 0, 0);
add_reg_note (user, REG_CC_SETTER, insn);
add_reg_note (insn, REG_CC_USER, user);
}
/* Return the next insn that uses CC0 after INSN, which is assumed to /* Return the next insn that uses CC0 after INSN, which is assumed to
set it. This is the inverse of prev_cc0_setter (i.e., prev_cc0_setter set it. This is the inverse of prev_cc0_setter (i.e., prev_cc0_setter
applied to the result of this function should yield INSN). applied to the result of this function should yield INSN).
......
...@@ -134,6 +134,44 @@ along with GCC; see the file COPYING3. If not see ...@@ -134,6 +134,44 @@ along with GCC; see the file COPYING3. If not see
#define eligible_for_annul_false(INSN, SLOTS, TRIAL, FLAGS) 0 #define eligible_for_annul_false(INSN, SLOTS, TRIAL, FLAGS) 0
#endif #endif
/* First, some functions that were used before GCC got a control flow graph.
These functions are now only used here in reorg.c, and have therefore
been moved here to avoid inadvertent misuse elsewhere in the compiler. */
/* Return the last label to mark the same position as LABEL. Return LABEL
itself if it is null or any return rtx. */
static rtx
skip_consecutive_labels (rtx label)
{
rtx insn;
if (label && ANY_RETURN_P (label))
return label;
for (insn = label; insn != 0 && !INSN_P (insn); insn = NEXT_INSN (insn))
if (LABEL_P (insn))
label = insn;
return label;
}
/* INSN uses CC0 and is being moved into a delay slot. Set up REG_CC_SETTER
and REG_CC_USER notes so we can find it. */
static void
link_cc0_insns (rtx insn)
{
rtx user = next_nonnote_insn (insn);
if (NONJUMP_INSN_P (user) && GET_CODE (PATTERN (user)) == SEQUENCE)
user = XVECEXP (PATTERN (user), 0, 0);
add_reg_note (user, REG_CC_SETTER, insn);
add_reg_note (insn, REG_CC_USER, user);
}
/* Insns which have delay slots that have not yet been filled. */ /* Insns which have delay slots that have not yet been filled. */
static struct obstack unfilled_slots_obstack; static struct obstack unfilled_slots_obstack;
......
...@@ -1912,8 +1912,6 @@ extern rtx next_real_insn (rtx); ...@@ -1912,8 +1912,6 @@ extern rtx next_real_insn (rtx);
extern rtx prev_active_insn (rtx); extern rtx prev_active_insn (rtx);
extern rtx next_active_insn (rtx); extern rtx next_active_insn (rtx);
extern int active_insn_p (const_rtx); extern int active_insn_p (const_rtx);
extern rtx next_label (rtx);
extern rtx skip_consecutive_labels (rtx);
extern rtx next_cc0_user (rtx); extern rtx next_cc0_user (rtx);
extern rtx prev_cc0_setter (rtx); extern rtx prev_cc0_setter (rtx);
...@@ -2551,7 +2549,6 @@ extern unsigned int unshare_all_rtl (void); ...@@ -2551,7 +2549,6 @@ extern unsigned int unshare_all_rtl (void);
extern void unshare_all_rtl_again (rtx); extern void unshare_all_rtl_again (rtx);
extern void unshare_all_rtl_in_chain (rtx); extern void unshare_all_rtl_in_chain (rtx);
extern void verify_rtl_sharing (void); extern void verify_rtl_sharing (void);
extern void link_cc0_insns (rtx);
extern void add_insn (rtx); extern void add_insn (rtx);
extern void add_insn_before (rtx, rtx, basic_block); extern void add_insn_before (rtx, rtx, basic_block);
extern void add_insn_after (rtx, rtx, basic_block); extern void add_insn_after (rtx, rtx, basic_block);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment