aboutsummaryrefslogtreecommitdiff
path: root/gcc/cfgrtl.c
diff options
context:
space:
mode:
authorKenneth Zadeck <zadeck@naturalbridge.com>2006-04-26 16:17:01 +0000
committerKenneth Zadeck <zadeck@gcc.gnu.org>2006-04-26 16:17:01 +0000
commit3bf7d5e771191ba6d0bca886593961ebabd33ffc (patch)
tree231193cbd82c75c77a4c853332c8e539761f1a7f /gcc/cfgrtl.c
parent7b282ff9a0f32ed6d8ebd86f98cc784c5df13a5d (diff)
downloadgcc-3bf7d5e771191ba6d0bca886593961ebabd33ffc.zip
gcc-3bf7d5e771191ba6d0bca886593961ebabd33ffc.tar.gz
gcc-3bf7d5e771191ba6d0bca886593961ebabd33ffc.tar.bz2
basic-block.h (safe_insert_insn_on_edge): Removed.
2006-04-26 Kenneth Zadeck <zadeck@naturalbridge.com> * basic-block.h (safe_insert_insn_on_edge): Removed. * cfgrtl.c (mark_killed_regs, safe_insert_insn_on_edge): Removed. From-SVN: r113276
Diffstat (limited to 'gcc/cfgrtl.c')
-rw-r--r--gcc/cfgrtl.c103
1 files changed, 0 insertions, 103 deletions
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index 54f355e..026b37e 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -77,7 +77,6 @@ static edge rtl_redirect_edge_and_branch (edge, basic_block);
static basic_block rtl_split_block (basic_block, void *);
static void rtl_dump_bb (basic_block, FILE *, int);
static int rtl_verify_flow_info_1 (void);
-static void mark_killed_regs (rtx, rtx, void *);
static void rtl_make_forwarder_block (edge);
/* Return true if NOTE is not one of the ones that must be kept paired,
@@ -1337,108 +1336,6 @@ insert_insn_on_edge (rtx pattern, edge e)
end_sequence ();
}
-/* Called from safe_insert_insn_on_edge through note_stores, marks live
- registers that are killed by the store. */
-static void
-mark_killed_regs (rtx reg, rtx set ATTRIBUTE_UNUSED, void *data)
-{
- regset killed = data;
- int regno, i;
-
- if (GET_CODE (reg) == SUBREG)
- reg = SUBREG_REG (reg);
- if (!REG_P (reg))
- return;
- regno = REGNO (reg);
- if (regno >= FIRST_PSEUDO_REGISTER)
- SET_REGNO_REG_SET (killed, regno);
- else
- {
- for (i = 0; i < (int) hard_regno_nregs[regno][GET_MODE (reg)]; i++)
- SET_REGNO_REG_SET (killed, regno + i);
- }
-}
-
-/* Similar to insert_insn_on_edge, tries to put INSN to edge E. Additionally
- it checks whether this will not clobber the registers that are live on the
- edge (i.e. it requires liveness information to be up-to-date) and if there
- are some, then it tries to save and restore them. Returns true if
- successful. */
-bool
-safe_insert_insn_on_edge (rtx insn, edge e)
-{
- rtx x;
- regset killed;
- rtx save_regs = NULL_RTX;
- unsigned regno;
- enum machine_mode mode;
- reg_set_iterator rsi;
-
- killed = ALLOC_REG_SET (&reg_obstack);
-
- for (x = insn; x; x = NEXT_INSN (x))
- if (INSN_P (x))
- note_stores (PATTERN (x), mark_killed_regs, killed);
-
- /* Mark all hard registers as killed. Register allocator/reload cannot
- cope with the situation when life range of hard register spans operation
- for that the appropriate register is needed, i.e. it would be unsafe to
- extend the life ranges of hard registers. */
- for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
- if (!fixed_regs[regno]
- && !REGNO_PTR_FRAME_P (regno))
- SET_REGNO_REG_SET (killed, regno);
-
- bitmap_and_into (killed, e->dest->il.rtl->global_live_at_start);
-
- EXECUTE_IF_SET_IN_REG_SET (killed, 0, regno, rsi)
- {
- mode = regno < FIRST_PSEUDO_REGISTER
- ? reg_raw_mode[regno]
- : GET_MODE (regno_reg_rtx[regno]);
- if (mode == VOIDmode)
- return false;
-
- /* Avoid copying in CCmode if we can't. */
- if (!can_copy_p (mode))
- return false;
-
- save_regs = alloc_EXPR_LIST (0,
- alloc_EXPR_LIST (0,
- gen_reg_rtx (mode),
- gen_raw_REG (mode, regno)),
- save_regs);
- }
-
- if (save_regs)
- {
- rtx from, to;
-
- start_sequence ();
- for (x = save_regs; x; x = XEXP (x, 1))
- {
- from = XEXP (XEXP (x, 0), 1);
- to = XEXP (XEXP (x, 0), 0);
- emit_move_insn (to, from);
- }
- emit_insn (insn);
- for (x = save_regs; x; x = XEXP (x, 1))
- {
- from = XEXP (XEXP (x, 0), 0);
- to = XEXP (XEXP (x, 0), 1);
- emit_move_insn (to, from);
- }
- insn = get_insns ();
- end_sequence ();
- free_EXPR_LIST_list (&save_regs);
- }
- insert_insn_on_edge (insn, e);
-
- FREE_REG_SET (killed);
-
- return true;
-}
-
/* Update the CFG for the instructions queued on edge E. */
static void