summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 10:33:40 +0000
committerhubicka <hubicka@138bc75d-0d04-0410-961f-82ee72b054a4>2005-06-16 10:33:40 +0000
commite0dde8f8f8975b893fb6604a17de35ca881e85e9 (patch)
tree681bd279155de09165d78fad8c1bda0ae8a5495f
parent9bc610b610152b60bbcdd789e96b72b1392035c3 (diff)
downloadgcc-e0dde8f8f8975b893fb6604a17de35ca881e85e9.tar.gz
* basic-block.h (rtl_bb_info): Break out head_, end_,
global_live_at_start, global_live_at_end from ... (basic_block_def): ... here; update all references (BB_RTL): New flag. (init_rtl_bb_info): Declare. * cfgexpand.c (expand_gimple_basic_block): Init bb info, set BB_RTL flag. * cfgrtl.c: Include ggc.h (create_basic_block_structure): Init bb info. (rtl_verify_flow_info_1): Check BB_RTL flag and rtl_bb_info pointer. (init_rtl_bb_info): New function. (rtl_merge_block, cfglayout_merge_block): Copy global_live_at_end here. * cfghooks.c (merge_block): Do not copy global_live_at_end here. * cfg.c (clear_bb_flags): Skip BB_RTL flag. (dump_flow_info): Gueard global_live_* dumping. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@101082 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog16
-rw-r--r--gcc/basic-block.h38
-rw-r--r--gcc/bb-reorder.c12
-rw-r--r--gcc/bt-load.c4
-rw-r--r--gcc/cfg.c24
-rw-r--r--gcc/cfgcleanup.c2
-rw-r--r--gcc/cfgexpand.c7
-rw-r--r--gcc/cfghooks.c1
-rw-r--r--gcc/cfglayout.c12
-rw-r--r--gcc/cfgrtl.c87
-rw-r--r--gcc/combine.c23
-rw-r--r--gcc/config/frv/frv.c16
-rw-r--r--gcc/config/i386/i386.c2
-rw-r--r--gcc/config/ia64/ia64.c2
-rw-r--r--gcc/flow.c78
-rw-r--r--gcc/function.c4
-rw-r--r--gcc/global.c14
-rw-r--r--gcc/ifcvt.c31
-rw-r--r--gcc/local-alloc.c13
-rw-r--r--gcc/mode-switching.c10
-rw-r--r--gcc/postreload.c4
-rw-r--r--gcc/recog.c4
-rw-r--r--gcc/reg-stack.c4
-rw-r--r--gcc/regmove.c2
-rw-r--r--gcc/regrename.c2
-rw-r--r--gcc/reload.c4
-rw-r--r--gcc/reload1.c2
-rw-r--r--gcc/resource.c2
-rw-r--r--gcc/sched-ebb.c4
-rw-r--r--gcc/sched-rgn.c10
30 files changed, 255 insertions, 179 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 82fb8a6ca94..05f52804e49 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,21 @@
2005-06-16 Jan Hubicka <jh@suse.cz>
+ * basic-block.h (rtl_bb_info): Break out head_, end_,
+ global_live_at_start, global_live_at_end from ...
+ (basic_block_def): ... here; update all references
+ (BB_RTL): New flag.
+ (init_rtl_bb_info): Declare.
+ * cfgexpand.c (expand_gimple_basic_block): Init bb info, set BB_RTL
+ flag.
+ * cfgrtl.c: Include ggc.h
+ (create_basic_block_structure): Init bb info.
+ (rtl_verify_flow_info_1): Check BB_RTL flag and rtl_bb_info pointer.
+ (init_rtl_bb_info): New function.
+ (rtl_merge_block, cfglayout_merge_block): Copy global_live_at_end here.
+ * cfghooks.c (merge_block): Do not copy global_live_at_end here.
+ * cfg.c (clear_bb_flags): Skip BB_RTL flag.
+ (dump_flow_info): Gueard global_live_* dumping.
+
* Makefile.in (cfg.o): Add new dependencies.
* basic-block.h (reorder_block_def): Kill
original/copy/duplicated/copy_number fields.
diff --git a/gcc/basic-block.h b/gcc/basic-block.h
index d9244d271fd..948f9f4526e 100644
--- a/gcc/basic-block.h
+++ b/gcc/basic-block.h
@@ -183,6 +183,7 @@ struct loops;
/* Declared in tree-flow.h. */
struct edge_prediction;
+struct rtl_bb_info;
/* A basic block is a sequence of instructions with only entry and
only one exit. If any one of the instructions are executed, they
@@ -212,10 +213,6 @@ struct edge_prediction;
/* Basic block information indexed by block number. */
struct basic_block_def GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb")))
{
- /* The first and last insns of the block. */
- rtx head_;
- rtx end_;
-
/* Pointers to the first and last trees of the block. */
tree stmt_list;
@@ -223,12 +220,6 @@ struct basic_block_def GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb")
VEC(edge,gc) *preds;
VEC(edge,gc) *succs;
- /* The registers that are live on entry to this block. */
- bitmap GTY ((skip (""))) global_live_at_start;
-
- /* The registers that are live on exit from this block. */
- bitmap GTY ((skip (""))) global_live_at_end;
-
/* Auxiliary info specific to a pass. */
PTR GTY ((skip (""))) aux;
@@ -245,6 +236,10 @@ struct basic_block_def GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb")
/* The data used by basic block copying and reordering functions. */
struct reorder_block_def * rbi;
+ union basic_block_il_dependent {
+ struct rtl_bb_info * GTY ((tag ("1"))) rtl;
+ } GTY ((desc ("((%1.flags & BB_RTL) != 0)"))) il;
+
/* Chain of PHI nodes for this block. */
tree phi_nodes;
@@ -267,6 +262,19 @@ struct basic_block_def GTY((chain_next ("%h.next_bb"), chain_prev ("%h.prev_bb")
int flags;
};
+struct rtl_bb_info GTY(())
+{
+ /* The first and last insns of the block. */
+ rtx head_;
+ rtx end_;
+
+ /* The registers that are live on entry to this block. */
+ bitmap GTY ((skip (""))) global_live_at_start;
+
+ /* The registers that are live on exit from this block. */
+ bitmap GTY ((skip (""))) global_live_at_end;
+};
+
typedef struct basic_block_def *basic_block;
/* Structure to hold information about the blocks during reordering and
@@ -325,7 +333,10 @@ enum
BB_COLD_PARTITION = 128,
/* Set on block that was duplicated. */
- BB_DUPLICATED = 256
+ BB_DUPLICATED = 256,
+
+ /* Set on blocks that are in RTL format. */
+ BB_RTL = 1024
};
/* Dummy flag for convenience in the hot/cold partitioning code. */
@@ -455,8 +466,8 @@ extern bitmap_obstack reg_obstack;
/* Stuff for recording basic block info. */
-#define BB_HEAD(B) (B)->head_
-#define BB_END(B) (B)->end_
+#define BB_HEAD(B) (B)->il.rtl->head_
+#define BB_END(B) (B)->il.rtl->end_
/* Special block numbers [markers] for entry and exit. */
#define ENTRY_BLOCK (-1)
@@ -976,6 +987,7 @@ extern edge try_redirect_by_replacing_jump (edge, basic_block, bool);
extern void break_superblocks (void);
extern void check_bb_profile (basic_block, FILE *);
extern void update_bb_profile_for_threading (basic_block, int, gcov_type, edge);
+extern void init_rtl_bb_info (basic_block);
extern void initialize_original_copy_tables (void);
extern void free_original_copy_tables (void);
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index e0cba445c67..2266ce50f5e 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -1603,12 +1603,12 @@ fix_crossing_conditional_branches (void)
/* Update register liveness information. */
- new_bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
- new_bb->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
- COPY_REG_SET (new_bb->global_live_at_end,
- prev_bb->global_live_at_end);
- COPY_REG_SET (new_bb->global_live_at_start,
- prev_bb->global_live_at_end);
+ new_bb->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ new_bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
+ COPY_REG_SET (new_bb->il.rtl->global_live_at_end,
+ prev_bb->il.rtl->global_live_at_end);
+ COPY_REG_SET (new_bb->il.rtl->global_live_at_start,
+ prev_bb->il.rtl->global_live_at_end);
/* Put appropriate instructions in new bb. */
diff --git a/gcc/bt-load.c b/gcc/bt-load.c
index d58dab7a1f0..ab3f97e03dc 100644
--- a/gcc/bt-load.c
+++ b/gcc/bt-load.c
@@ -476,7 +476,7 @@ compute_defs_uses_and_gen (fibheap_t all_btr_defs, btr_def *def_array,
CLEAR_HARD_REG_SET (info.btrs_written_in_block);
for (reg = first_btr; reg <= last_btr; reg++)
if (TEST_HARD_REG_BIT (all_btrs, reg)
- && REGNO_REG_SET_P (bb->global_live_at_start, reg))
+ && REGNO_REG_SET_P (bb->il.rtl->global_live_at_start, reg))
SET_HARD_REG_BIT (info.btrs_live_in_block, reg);
for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb));
@@ -577,7 +577,7 @@ compute_defs_uses_and_gen (fibheap_t all_btr_defs, btr_def *def_array,
COPY_HARD_REG_SET (btrs_live[i], info.btrs_live_in_block);
COPY_HARD_REG_SET (btrs_written[i], info.btrs_written_in_block);
- REG_SET_TO_HARD_REG_SET (btrs_live_at_end[i], bb->global_live_at_end);
+ REG_SET_TO_HARD_REG_SET (btrs_live_at_end[i], bb->il.rtl->global_live_at_end);
/* If this block ends in a jump insn, add any uses or even clobbers
of branch target registers that it might have. */
for (insn = BB_END (bb); insn != BB_HEAD (bb) && ! INSN_P (insn); )
diff --git a/gcc/cfg.c b/gcc/cfg.c
index f33a95061a0..4add5df8762 100644
--- a/gcc/cfg.c
+++ b/gcc/cfg.c
@@ -421,7 +421,8 @@ clear_bb_flags (void)
basic_block bb;
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
- bb->flags = BB_PARTITION (bb) | (bb->flags & BB_DISABLE_SCHEDULE);
+ bb->flags = (BB_PARTITION (bb) | (bb->flags & BB_DISABLE_SCHEDULE)
+ | (bb->flags & BB_RTL));
}
/* Check the consistency of profile information. We can't do that
@@ -553,16 +554,19 @@ dump_flow_info (FILE *file)
FOR_EACH_EDGE (e, ei, bb->succs)
dump_edge_info (file, e, 1);
- if (bb->global_live_at_start)
+ if (bb->flags & BB_RTL)
{
- fprintf (file, "\nRegisters live at start:");
- dump_regset (bb->global_live_at_start, file);
- }
-
- if (bb->global_live_at_end)
- {
- fprintf (file, "\nRegisters live at end:");
- dump_regset (bb->global_live_at_end, file);
+ if (bb->il.rtl->global_live_at_start)
+ {
+ fprintf (file, "\nRegisters live at start:");
+ dump_regset (bb->il.rtl->global_live_at_start, file);
+ }
+
+ if (bb->il.rtl->global_live_at_end)
+ {
+ fprintf (file, "\nRegisters live at end:");
+ dump_regset (bb->il.rtl->global_live_at_end, file);
+ }
}
putc ('\n', file);
diff --git a/gcc/cfgcleanup.c b/gcc/cfgcleanup.c
index 98c82452ca3..fd8a1294075 100644
--- a/gcc/cfgcleanup.c
+++ b/gcc/cfgcleanup.c
@@ -395,7 +395,7 @@ thread_jump (int mode, edge e, basic_block b)
/* In case liveness information is available, we need to prove equivalence
only of the live values. */
if (mode & CLEANUP_UPDATE_LIFE)
- AND_REG_SET (nonequal, b->global_live_at_end);
+ AND_REG_SET (nonequal, b->il.rtl->global_live_at_end);
EXECUTE_IF_SET_IN_REG_SET (nonequal, 0, i, rsi)
goto failed_exit;
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 63a4136f238..d3acbb0a3a9 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -1056,6 +1056,9 @@ expand_gimple_basic_block (basic_block bb, FILE * dump_file)
bb->index);
}
+ init_rtl_bb_info (bb);
+ bb->flags |= BB_RTL;
+
if (!bsi_end_p (bsi))
stmt = bsi_stmt (bsi);
@@ -1162,6 +1165,10 @@ construct_init_block (void)
/* Multiple entry points not supported yet. */
gcc_assert (EDGE_COUNT (ENTRY_BLOCK_PTR->succs) == 1);
+ init_rtl_bb_info (ENTRY_BLOCK_PTR);
+ init_rtl_bb_info (EXIT_BLOCK_PTR);
+ ENTRY_BLOCK_PTR->flags |= BB_RTL;
+ EXIT_BLOCK_PTR->flags |= BB_RTL;
e = EDGE_SUCC (ENTRY_BLOCK_PTR, 0);
diff --git a/gcc/cfghooks.c b/gcc/cfghooks.c
index 2af7c0612cb..d684cc729cc 100644
--- a/gcc/cfghooks.c
+++ b/gcc/cfghooks.c
@@ -545,7 +545,6 @@ merge_blocks (basic_block a, basic_block b)
/* B hasn't quite yet ceased to exist. Attempt to prevent mishap. */
b->preds = b->succs = NULL;
- a->global_live_at_end = b->global_live_at_end;
if (dom_computed[CDI_DOMINATORS])
redirect_immediate_dominators (CDI_DOMINATORS, b, a);
diff --git a/gcc/cfglayout.c b/gcc/cfglayout.c
index 7cf0dcf2743..4eda4f40a75 100644
--- a/gcc/cfglayout.c
+++ b/gcc/cfglayout.c
@@ -1074,12 +1074,14 @@ cfg_layout_duplicate_bb (basic_block bb)
new_bb->rbi->footer = unlink_insn_chain (insn, get_last_insn ());
}
- if (bb->global_live_at_start)
+ if (bb->il.rtl->global_live_at_start)
{
- new_bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
- new_bb->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
- COPY_REG_SET (new_bb->global_live_at_start, bb->global_live_at_start);
- COPY_REG_SET (new_bb->global_live_at_end, bb->global_live_at_end);
+ new_bb->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ new_bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
+ COPY_REG_SET (new_bb->il.rtl->global_live_at_start,
+ bb->il.rtl->global_live_at_start);
+ COPY_REG_SET (new_bb->il.rtl->global_live_at_end,
+ bb->il.rtl->global_live_at_end);
}
return new_bb;
diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c
index f414def06bd..51c86dbb66b 100644
--- a/gcc/cfgrtl.c
+++ b/gcc/cfgrtl.c
@@ -58,6 +58,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
#include "expr.h"
#include "target.h"
#include "cfgloop.h"
+#include "ggc.h"
static int can_delete_note_p (rtx);
static int can_delete_label_p (rtx);
@@ -273,6 +274,7 @@ create_basic_block_structure (rtx head, rtx end, rtx bb_note, basic_block after)
bb = alloc_block ();
+ init_rtl_bb_info (bb);
if (!head && !end)
head = end = bb_note
= emit_note_after (NOTE_INSN_BASIC_BLOCK, get_last_insn ());
@@ -300,7 +302,7 @@ create_basic_block_structure (rtx head, rtx end, rtx bb_note, basic_block after)
BB_HEAD (bb) = head;
BB_END (bb) = end;
bb->index = last_basic_block++;
- bb->flags = BB_NEW;
+ bb->flags = BB_NEW | BB_RTL;
link_block (bb, after);
BASIC_BLOCK (bb->index) = bb;
update_bb_for_insn (bb);
@@ -478,21 +480,21 @@ rtl_split_block (basic_block bb, void *insnp)
FOR_EACH_EDGE (e, ei, new_bb->succs)
e->src = new_bb;
- if (bb->global_live_at_start)
+ if (bb->il.rtl->global_live_at_start)
{
- new_bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
- new_bb->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
- COPY_REG_SET (new_bb->global_live_at_end, bb->global_live_at_end);
+ new_bb->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ new_bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
+ COPY_REG_SET (new_bb->il.rtl->global_live_at_end, bb->il.rtl->global_live_at_end);
/* We now have to calculate which registers are live at the end
of the split basic block and at the start of the new basic
block. Start with those registers that are known to be live
at the end of the original basic block and get
propagate_block to determine which registers are live. */
- COPY_REG_SET (new_bb->global_live_at_start, bb->global_live_at_end);
- propagate_block (new_bb, new_bb->global_live_at_start, NULL, NULL, 0);
- COPY_REG_SET (bb->global_live_at_end,
- new_bb->global_live_at_start);
+ COPY_REG_SET (new_bb->il.rtl->global_live_at_start, bb->il.rtl->global_live_at_end);
+ propagate_block (new_bb, new_bb->il.rtl->global_live_at_start, NULL, NULL, 0);
+ COPY_REG_SET (bb->il.rtl->global_live_at_end,
+ new_bb->il.rtl->global_live_at_start);
#ifdef HAVE_conditional_execution
/* In the presence of conditional execution we are not able to update
liveness precisely. */
@@ -593,6 +595,7 @@ rtl_merge_blocks (basic_block a, basic_block b)
}
BB_END (a) = a_end;
+ a->il.rtl->global_live_at_end = b->il.rtl->global_live_at_end;
}
/* Return true when block A and B can be merged. */
@@ -1083,14 +1086,14 @@ force_nonfallthru_and_redirect (edge e, basic_block target)
jump_block->frequency = EDGE_FREQUENCY (e);
jump_block->loop_depth = target->loop_depth;
- if (target->global_live_at_start)
+ if (target->il.rtl->global_live_at_start)
{
- jump_block->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
- jump_block->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
- COPY_REG_SET (jump_block->global_live_at_start,
- target->global_live_at_start);
- COPY_REG_SET (jump_block->global_live_at_end,
- target->global_live_at_start);
+ jump_block->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ jump_block->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
+ COPY_REG_SET (jump_block->il.rtl->global_live_at_start,
+ target->il.rtl->global_live_at_start);
+ COPY_REG_SET (jump_block->il.rtl->global_live_at_end,
+ target->il.rtl->global_live_at_start);
}
/* Make sure new block ends up in correct hot/cold section. */
@@ -1351,14 +1354,14 @@ rtl_split_edge (edge edge_in)
}
/* ??? This info is likely going to be out of date very soon. */
- if (edge_in->dest->global_live_at_start)
+ if (edge_in->dest->il.rtl->global_live_at_start)
{
- bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
- bb->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
- COPY_REG_SET (bb->global_live_at_start,
- edge_in->dest->global_live_at_start);
- COPY_REG_SET (bb->global_live_at_end,
- edge_in->dest->global_live_at_start);
+ bb->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
+ COPY_REG_SET (bb->il.rtl->global_live_at_start,
+ edge_in->dest->il.rtl->global_live_at_start);
+ COPY_REG_SET (bb->il.rtl->global_live_at_end,
+ edge_in->dest->il.rtl->global_live_at_start);
}
make_single_succ_edge (bb, edge_in->dest, EDGE_FALLTHRU);
@@ -1457,7 +1460,7 @@ safe_insert_insn_on_edge (rtx insn, edge e)
&& !REGNO_PTR_FRAME_P (regno))
SET_REGNO_REG_SET (killed, regno);
- bitmap_and_into (killed, e->dest->global_live_at_start);
+ bitmap_and_into (killed, e->dest->il.rtl->global_live_at_start);
EXECUTE_IF_SET_IN_REG_SET (killed, 0, regno, rsi)
{
@@ -1760,7 +1763,7 @@ rtl_dump_bb (basic_block bb, FILE *outf, int indent)
s_indent[indent] = '\0';
fprintf (outf, ";;%s Registers live at start: ", s_indent);
- dump_regset (bb->global_live_at_start, outf);
+ dump_regset (bb->il.rtl->global_live_at_start, outf);
putc ('\n', outf);
for (insn = BB_HEAD (bb), last = NEXT_INSN (BB_END (bb)); insn != last;
@@ -1768,7 +1771,7 @@ rtl_dump_bb (basic_block bb, FILE *outf, int indent)
print_rtl_single (outf, insn);
fprintf (outf, ";;%s Registers live at end: ", s_indent);
- dump_regset (bb->global_live_at_end, outf);
+ dump_regset (bb->il.rtl->global_live_at_end, outf);
putc ('\n', outf);
}
@@ -1819,7 +1822,7 @@ print_rtl_with_bb (FILE *outf, rtx rtx_first)
{
fprintf (outf, ";; Start of basic block %d, registers live:",
bb->index);
- dump_regset (bb->global_live_at_start, outf);
+ dump_regset (bb->il.rtl->global_live_at_start, outf);
putc ('\n', outf);
}
@@ -1836,7 +1839,7 @@ print_rtl_with_bb (FILE *outf, rtx rtx_first)
{
fprintf (outf, ";; End of basic block %d, registers live:\n",
bb->index);
- dump_regset (bb->global_live_at_end, outf);
+ dump_regset (bb->il.rtl->global_live_at_end, outf);
putc ('\n', outf);
}
@@ -1908,6 +1911,12 @@ rtl_verify_flow_info_1 (void)
if (x == end)
break;
+ if (!(bb->flags & BB_RTL))
+ {
+ error ("BB_RTL flag not set for block %d", bb->index);
+ err = 1;
+ }
+
if (!x)
{
error ("end insn %d for block %d not found in the insn stream",
@@ -2775,6 +2784,7 @@ cfg_layout_merge_blocks (basic_block a, basic_block b)
}
b->rbi->footer = NULL;
}
+ a->il.rtl->global_live_at_end = b->il.rtl->global_live_at_end;
if (dump_file)
fprintf (dump_file, "Merged blocks %d and %d.\n",
@@ -2793,14 +2803,14 @@ cfg_layout_split_edge (edge e)
/* ??? This info is likely going to be out of date very soon, but we must
create it to avoid getting an ICE later. */
- if (e->dest->global_live_at_start)
+ if (e->dest->il.rtl->global_live_at_start)
{
- new_bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
- new_bb->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
- COPY_REG_SET (new_bb->global_live_at_start,
- e->dest->global_live_at_start);
- COPY_REG_SET (new_bb->global_live_at_end,
- e->dest->global_live_at_start);
+ new_bb->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ new_bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
+ COPY_REG_SET (new_bb->il.rtl->global_live_at_start,
+ e->dest->il.rtl->global_live_at_start);
+ COPY_REG_SET (new_bb->il.rtl->global_live_at_end,
+ e->dest->il.rtl->global_live_at_start);
}
make_edge (new_bb, e->dest, EDGE_FALLTHRU);
@@ -3047,6 +3057,13 @@ rtl_extract_cond_bb_edges (basic_block b, edge *branch_edge,
}
}
+void
+init_rtl_bb_info (basic_block bb)
+{
+ gcc_assert (!bb->il.rtl);
+ bb->il.rtl = ggc_alloc_cleared (sizeof (struct rtl_bb_info));
+}
+
/* Implementation of CFG manipulation for linearized RTL. */
struct cfg_hooks rtl_cfg_hooks = {
diff --git a/gcc/combine.c b/gcc/combine.c
index 2f0b787ee57..d618c9fcf5c 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -985,7 +985,8 @@ set_nonzero_bits_and_sign_copies (rtx x, rtx set,
&& REGNO (x) >= FIRST_PSEUDO_REGISTER
/* If this register is undefined at the start of the file, we can't
say what its contents were. */
- && ! REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, REGNO (x))
+ && ! REGNO_REG_SET_P
+ (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start, REGNO (x))
&& GET_MODE_BITSIZE (GET_MODE (x)) <= HOST_BITS_PER_WIDE_INT)
{
if (set == 0 || GET_CODE (set) == CLOBBER)
@@ -8278,8 +8279,9 @@ reg_nonzero_bits_for_combine (rtx x, enum machine_mode mode,
&& (reg_stat[REGNO (x)].last_set_label == label_tick
|| (REGNO (x) >= FIRST_PSEUDO_REGISTER
&& REG_N_SETS (REGNO (x)) == 1
- && ! REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start,
- REGNO (x))))
+ && ! REGNO_REG_SET_P
+ (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start,
+ REGNO (x))))
&& INSN_CUID (reg_stat[REGNO (x)].last_set) < subst_low_cuid)
{
*nonzero &= reg_stat[REGNO (x)].last_set_nonzero_bits;
@@ -8345,8 +8347,9 @@ reg_num_sign_bit_copies_for_combine (rtx x, enum machine_mode mode,
&& (reg_stat[REGNO (x)].last_set_label == label_tick
|| (REGNO (x) >= FIRST_PSEUDO_REGISTER
&& REG_N_SETS (REGNO (x)) == 1
- && ! REGNO_REG_SET_P (ENTRY_BLOCK_PTR->next_bb->global_live_at_start,
- REGNO (x))))
+ && ! REGNO_REG_SET_P
+ (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start,
+ REGNO (x))))
&& INSN_CUID (reg_stat[REGNO (x)].last_set) < subst_low_cuid)
{
*result = reg_stat[REGNO (x)].last_set_sign_bit_copies;
@@ -11180,7 +11183,8 @@ get_last_value_validate (rtx *loc, rtx insn, int tick, int replace)
|| (! (regno >= FIRST_PSEUDO_REGISTER
&& REG_N_SETS (regno) == 1
&& (! REGNO_REG_SET_P
- (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, regno)))
+ (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start,
+ regno)))
&& reg_stat[j].last_set_label > tick))
{
if (replace)
@@ -11290,7 +11294,8 @@ get_last_value (rtx x)
&& (regno < FIRST_PSEUDO_REGISTER
|| REG_N_SETS (regno) != 1
|| (REGNO_REG_SET_P
- (ENTRY_BLOCK_PTR->next_bb->global_live_at_start, regno)))))
+ (ENTRY_BLOCK_PTR->next_bb->il.rtl->global_live_at_start,
+ regno)))))
return 0;
/* If the value was set in a later insn than the ones we are processing,
@@ -11451,7 +11456,7 @@ reg_dead_at_p (rtx reg, rtx insn)
}
for (i = reg_dead_regno; i < reg_dead_endregno; i++)
- if (REGNO_REG_SET_P (block->global_live_at_start, i))
+ if (REGNO_REG_SET_P (block->il.rtl->global_live_at_start, i))
return 0;
return 1;
@@ -12218,7 +12223,7 @@ distribute_notes (rtx notes, rtx from_insn, rtx i3, rtx i2)
was dead, there's nothing left to do. Otherwise, we'll
need to do a global life update after combine. */
if (REG_NOTE_KIND (note) == REG_DEAD && place == 0
- && REGNO_REG_SET_P (bb->global_live_at_start,
+ && REGNO_REG_SET_P (bb->il.rtl->global_live_at_start,
REGNO (XEXP (note, 0))))
SET_BIT (refresh_blocks, this_basic_block->index);
}
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index b54c085858d..f0301468631 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -5265,13 +5265,15 @@ frv_ifcvt_modify_tests (ce_if_block_t *ce_info, rtx *p_true, rtx *p_false)
for (j = CC_FIRST; j <= CC_LAST; j++)
if (TEST_HARD_REG_BIT (tmp_reg->regs, j))
{
- if (REGNO_REG_SET_P (then_bb->global_live_at_start, j))
+ if (REGNO_REG_SET_P (then_bb->il.rtl->global_live_at_start, j))
continue;
- if (else_bb && REGNO_REG_SET_P (else_bb->global_live_at_start, j))
+ if (else_bb
+ && REGNO_REG_SET_P (else_bb->il.rtl->global_live_at_start, j))
continue;
- if (join_bb && REGNO_REG_SET_P (join_bb->global_live_at_start, j))
+ if (join_bb
+ && REGNO_REG_SET_P (join_bb->il.rtl->global_live_at_start, j))
continue;
SET_HARD_REG_BIT (frv_ifcvt.nested_cc_ok_rewrite, j);
@@ -5293,7 +5295,7 @@ frv_ifcvt_modify_tests (ce_if_block_t *ce_info, rtx *p_true, rtx *p_false)
/* Remove anything live at the beginning of the join block from being
available for allocation. */
- EXECUTE_IF_SET_IN_REG_SET (join_bb->global_live_at_start, 0, regno, rsi)
+ EXECUTE_IF_SET_IN_REG_SET (join_bb->il.rtl->global_live_at_start, 0, regno, rsi)
{
if (regno < FIRST_PSEUDO_REGISTER)
CLEAR_HARD_REG_BIT (tmp_reg->regs, regno);
@@ -5337,7 +5339,7 @@ frv_ifcvt_modify_tests (ce_if_block_t *ce_info, rtx *p_true, rtx *p_false)
/* Anything live at the beginning of the block is obviously unavailable
for allocation. */
- EXECUTE_IF_SET_IN_REG_SET (bb[j]->global_live_at_start, 0, regno, rsi)
+ EXECUTE_IF_SET_IN_REG_SET (bb[j]->il.rtl->global_live_at_start, 0, regno, rsi)
{
if (regno < FIRST_PSEUDO_REGISTER)
CLEAR_HARD_REG_BIT (tmp_reg->regs, regno);
@@ -5991,7 +5993,7 @@ frv_ifcvt_modify_insn (ce_if_block_t *ce_info,
severely. */
&& ce_info->join_bb
&& ! (REGNO_REG_SET_P
- (ce_info->join_bb->global_live_at_start,
+ (ce_info->join_bb->il.rtl->global_live_at_start,
REGNO (SET_DEST (set))))
/* Similarly, we must not unconditionally set a reg
used as scratch in the THEN branch if the same reg
@@ -5999,7 +6001,7 @@ frv_ifcvt_modify_insn (ce_if_block_t *ce_info,
&& (! ce_info->else_bb
|| BLOCK_FOR_INSN (insn) == ce_info->else_bb
|| ! (REGNO_REG_SET_P
- (ce_info->else_bb->global_live_at_start,
+ (ce_info->else_bb->il.rtl->global_live_at_start,
REGNO (SET_DEST (set))))))
pattern = set;
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index dfaac94dff0..9ced83123d8 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -1920,7 +1920,7 @@ ix86_eax_live_at_start_p (void)
to correct at this point. This gives false positives for broken
functions that might use uninitialized data that happens to be
allocated in eax, but who cares? */
- return REGNO_REG_SET_P (ENTRY_BLOCK_PTR->global_live_at_end, 0);
+ return REGNO_REG_SET_P (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end, 0);
}
/* Value is the number of bytes of arguments automatically
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index bf9375a4733..dc701e4dc58 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -7417,7 +7417,7 @@ emit_predicate_relation_info (void)
/* Skip p0, which may be thought to be live due to (reg:DI p0)
grabbing the entire block of predicate registers. */
for (r = PR_REG (2); r < PR_REG (64); r += 2)
- if (REGNO_REG_SET_P (bb->global_live_at_start, r))
+ if (REGNO_REG_SET_P (bb->il.rtl->global_live_at_start, r))
{
rtx p = gen_rtx_REG (BImode, r);
rtx n = emit_insn_after (gen_pred_rel_mutex (p), head);
diff --git a/gcc/flow.c b/gcc/flow.c
index b73ac4d09bc..0577cd0e74b 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -416,7 +416,7 @@ life_analysis (FILE *file, int flags)
allocate_bb_life_data ();
/* Find the set of registers live on function exit. */
- mark_regs_live_at_end (EXIT_BLOCK_PTR->global_live_at_start);
+ mark_regs_live_at_end (EXIT_BLOCK_PTR->il.rtl->global_live_at_start);
/* "Update" life info from zero. It'd be nice to begin the
relaxation with just the exit and noreturn blocks, but that set
@@ -504,7 +504,8 @@ verify_local_live_at_start (regset new_live_at_start, basic_block bb)
{
/* After reload, there are no pseudos, nor subregs of multi-word
registers. The regsets should exactly match. */
- if (! REG_SET_EQUAL_P (new_live_at_start, bb->global_live_at_start))
+ if (! REG_SET_EQUAL_P (new_live_at_start,
+ bb->il.rtl->global_live_at_start))
{
if (dump_file)
{
@@ -524,12 +525,12 @@ verify_local_live_at_start (regset new_live_at_start, basic_block bb)
reg_set_iterator rsi;
/* Find the set of changed registers. */
- XOR_REG_SET (new_live_at_start, bb->global_live_at_start);
+ XOR_REG_SET (new_live_at_start, bb->il.rtl->global_live_at_start);
EXECUTE_IF_SET_IN_REG_SET (new_live_at_start, 0, i, rsi)
{
/* No registers should die. */
- if (REGNO_REG_SET_P (bb->global_live_at_start, i))
+ if (REGNO_REG_SET_P (bb->il.rtl->global_live_at_start, i))
{
if (dump_file)
{
@@ -608,7 +609,7 @@ update_life_info (sbitmap blocks, enum update_life_extent extent,
in turn may allow for further dead code detection / removal. */
FOR_EACH_BB_REVERSE (bb)
{
- COPY_REG_SET (tmp, bb->global_live_at_end);
+ COPY_REG_SET (tmp, bb->il.rtl->global_live_at_end);
changed |= propagate_block (bb, tmp, NULL, NULL,
prop_flags & (PROP_SCAN_DEAD_CODE
| PROP_SCAN_DEAD_STORES
@@ -637,8 +638,8 @@ update_life_info (sbitmap blocks, enum update_life_extent extent,
in the code being marked live at entry. */
FOR_EACH_BB (bb)
{
- CLEAR_REG_SET (bb->global_live_at_start);
- CLEAR_REG_SET (bb->global_live_at_end);
+ CLEAR_REG_SET (bb->il.rtl->global_live_at_start);
+ CLEAR_REG_SET (bb->il.rtl->global_live_at_end);
}
}
@@ -659,7 +660,7 @@ update_life_info (sbitmap blocks, enum update_life_extent extent,
{
bb = BASIC_BLOCK (i);
- COPY_REG_SET (tmp, bb->global_live_at_end);
+ COPY_REG_SET (tmp, bb->il.rtl->global_live_at_end);
propagate_block (bb, tmp, NULL, NULL, stabilized_prop_flags);
if (extent == UPDATE_LIFE_LOCAL)
@@ -670,7 +671,7 @@ update_life_info (sbitmap blocks, enum update_life_extent extent,
{
FOR_EACH_BB_REVERSE (bb)
{
- COPY_REG_SET (tmp, bb->global_live_at_end);
+ COPY_REG_SET (tmp, bb->il.rtl->global_live_at_end);
propagate_block (bb, tmp, NULL, NULL, stabilized_prop_flags);
@@ -689,7 +690,7 @@ update_life_info (sbitmap blocks, enum update_life_extent extent,
are those that were not set anywhere in the function. local-alloc
doesn't know how to handle these correctly, so mark them as not
local to any one basic block. */
- EXECUTE_IF_SET_IN_REG_SET (ENTRY_BLOCK_PTR->global_live_at_end,
+ EXECUTE_IF_SET_IN_REG_SET (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end,
FIRST_PSEUDO_REGISTER, i, rsi)
REG_BASIC_BLOCK (i) = REG_BLOCK_GLOBAL;
@@ -767,9 +768,9 @@ free_basic_block_vars (void)
label_to_block_map = NULL;
ENTRY_BLOCK_PTR->aux = NULL;
- ENTRY_BLOCK_PTR->global_live_at_end = NULL;
+ ENTRY_BLOCK_PTR->il.rtl->global_live_at_end = NULL;
EXIT_BLOCK_PTR->aux = NULL;
- EXIT_BLOCK_PTR->global_live_at_start = NULL;
+ EXIT_BLOCK_PTR->il.rtl->global_live_at_start = NULL;
}
/* Delete any insns that copy a register to itself. */
@@ -1186,10 +1187,10 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
confused by sibling call edges, which crashes reg-stack. */
if (e->flags & EDGE_EH)
bitmap_ior_and_compl_into (new_live_at_end,
- sb->global_live_at_start,
+ sb->il.rtl->global_live_at_start,
invalidated_by_call);
else
- IOR_REG_SET (new_live_at_end, sb->global_live_at_start);
+ IOR_REG_SET (new_live_at_end, sb->il.rtl->global_live_at_start);
/* If a target saves one register in another (instead of on
the stack) the save register will need to be live for EH. */
@@ -1236,7 +1237,7 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
if (bb == ENTRY_BLOCK_PTR)
{
- COPY_REG_SET (bb->global_live_at_end, new_live_at_end);
+ COPY_REG_SET (bb->il.rtl->global_live_at_end, new_live_at_end);
continue;
}
@@ -1259,7 +1260,7 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
rescan the block. This wouldn't be necessary if we had
precalculated local_live, however with PROP_SCAN_DEAD_CODE
local_live is really dependent on live_at_end. */
- rescan = bitmap_intersect_compl_p (bb->global_live_at_end,
+ rescan = bitmap_intersect_compl_p (bb->il.rtl->global_live_at_end,
new_live_at_end);
if (!rescan)
@@ -1284,7 +1285,7 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
/* Find the set of changed bits. Take this opportunity
to notice that this set is empty and early out. */
- bitmap_xor (tmp, bb->global_live_at_end, new_live_at_end);
+ bitmap_xor (tmp, bb->il.rtl->global_live_at_end, new_live_at_end);
if (bitmap_empty_p (tmp))
continue;
@@ -1305,16 +1306,16 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
/* Add to live_at_start the set of all registers in
new_live_at_end that aren't in the old live_at_end. */
- changed = bitmap_ior_and_compl_into (bb->global_live_at_start,
+ changed = bitmap_ior_and_compl_into (bb->il.rtl->global_live_at_start,
new_live_at_end,
- bb->global_live_at_end);
- COPY_REG_SET (bb->global_live_at_end, new_live_at_end);
+ bb->il.rtl->global_live_at_end);
+ COPY_REG_SET (bb->il.rtl->global_live_at_end, new_live_at_end);
if (! changed)
continue;
}
else
{
- COPY_REG_SET (bb->global_live_at_end, new_live_at_end);
+ COPY_REG_SET (bb->il.rtl->global_live_at_end, new_live_at_end);
/* Rescan the block insn by insn to turn (a copy of) live_at_end
into live_at_start. */
@@ -1324,14 +1325,15 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
flags);
/* If live_at start didn't change, no need to go farther. */
- if (REG_SET_EQUAL_P (bb->global_live_at_start, new_live_at_end))
+ if (REG_SET_EQUAL_P (bb->il.rtl->global_live_at_start,
+ new_live_at_end))
continue;
if (failure_strategy_required)
{
/* Get the list of registers that were removed from the
bb->global_live_at_start set. */
- bitmap_and_compl (tmp, bb->global_live_at_start,
+ bitmap_and_compl (tmp, bb->il.rtl->global_live_at_start,
new_live_at_end);
if (!bitmap_empty_p (tmp))
{
@@ -1350,11 +1352,13 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
pbb_changed = false;
pbb_changed
- |= bitmap_and_compl_into (pbb->global_live_at_start,
- registers_made_dead);
+ |= bitmap_and_compl_into
+ (pbb->il.rtl->global_live_at_start,
+ registers_made_dead);
pbb_changed
- |= bitmap_and_compl_into (pbb->global_live_at_end,
- registers_made_dead);
+ |= bitmap_and_compl_into
+ (pbb->il.rtl->global_live_at_end,
+ registers_made_dead);
if (!pbb_changed)
continue;
@@ -1383,7 +1387,7 @@ calculate_global_regs_live (sbitmap blocks_in, sbitmap blocks_out, int flags)
}
} /* end of failure_strategy_required */
- COPY_REG_SET (bb->global_live_at_start, new_live_at_end);
+ COPY_REG_SET (bb->il.rtl->global_live_at_start, new_live_at_end);
}
/* Queue all predecessors of BB so that we may re-examine
@@ -1504,7 +1508,7 @@ initialize_uninitialized_subregs (void)
FOR_EACH_EDGE (e, ei, ENTRY_BLOCK_PTR->succs)
{
basic_block bb = e->dest;
- regset map = bb->global_live_at_start;
+ regset map = bb->il.rtl->global_live_at_start;
reg_set_iterator rsi;
EXECUTE_IF_SET_IN_REG_SET (map, FIRST_PSEUDO_REGISTER, reg, rsi)
@@ -1556,8 +1560,8 @@ allocate_bb_life_data (void)
FOR_BB_BETWEEN (bb, ENTRY_BLOCK_PTR, NULL, next_bb)
{
- bb->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
- bb->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
+ bb->il.rtl->global_live_at_start = ALLOC_REG_SET (&reg_obstack);
+ bb->il.rtl->global_live_at_end = ALLOC_REG_SET (&reg_obstack);
}
regs_live_at_setjmp = ALLOC_REG_SET (&reg_obstack);
@@ -1856,7 +1860,7 @@ propagate_one_insn (struct propagate_block_info *pbi, rtx insn)
except for return values. */
sibcall_p = SIBLING_CALL_P (insn);
- live_at_end = EXIT_BLOCK_PTR->global_live_at_start;
+ live_at_end = EXIT_BLOCK_PTR->il.rtl->global_live_at_start;
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i)
&& ! (sibcall_p
@@ -1991,8 +1995,8 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
}
/* Compute which register lead different lives in the successors. */
- bitmap_xor (diff, bb_true->global_live_at_start,
- bb_false->global_live_at_start);
+ bitmap_xor (diff, bb_true->il.rtl->global_live_at_start,
+ bb_false->il.rtl->global_live_at_start);
if (!bitmap_empty_p (diff))
{
@@ -2037,7 +2041,8 @@ init_propagate_block_info (basic_block bb, regset live, regset local_set,
rcli = xmalloc (sizeof (*rcli));
- if (REGNO_REG_SET_P (bb_true->global_live_at_start, i))
+ if (REGNO_REG_SET_P (bb_true->il.rtl->global_live_at_start,
+ i))
cond = cond_false;
else
cond = cond_true;
@@ -2468,7 +2473,8 @@ regno_clobbered_at_setjmp (int regno)
return 0;
return ((REG_N_SETS (regno) > 1
- || REGNO_REG_SET_P (ENTRY_BLOCK_PTR->global_live_at_end, regno))
+ || REGNO_REG_SET_P (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end,
+ regno))
&& REGNO_REG_SET_P (regs_live_at_setjmp, regno));
}
diff --git a/gcc/function.c b/gcc/function.c
index 6337b5dab1d..74db519955f 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -4702,8 +4702,8 @@ keep_stack_depressed (rtx insns)
if (HARD_REGNO_MODE_OK (regno, Pmode)
&& !fixed_regs[regno]
&& TEST_HARD_REG_BIT (regs_invalidated_by_call, regno)
- && !REGNO_REG_SET_P (EXIT_BLOCK_PTR->global_live_at_start,
- regno)
+ && !REGNO_REG_SET_P
+ (EXIT_BLOCK_PTR->il.rtl->global_live_at_start, regno)
&& !refers_to_regno_p (regno,
regno + hard_regno_nregs[regno]
[Pmode],
diff --git a/gcc/global.c b/gcc/global.c
index dea1fc55347..8a048108a48 100644
--- a/gcc/global.c
+++ b/gcc/global.c
@@ -694,7 +694,7 @@ global_conflicts (void)
be explicitly marked in basic_block_live_at_start. */
{
- regset old = b->global_live_at_start;
+ regset old = b->il.rtl->global_live_at_start;
int ax = 0;
reg_set_iterator rsi;
@@ -1726,7 +1726,7 @@ mark_elimination (int from, int to)
FOR_EACH_BB (bb)
{
- regset r = bb->global_live_at_start;
+ regset r = bb->il.rtl->global_live_at_start;
if (REGNO_REG_SET_P (r, from))
{
CLEAR_REGNO_REG_SET (r, from);
@@ -1816,7 +1816,7 @@ build_insn_chain (rtx first)
CLEAR_REG_SET (live_relevant_regs);
- EXECUTE_IF_SET_IN_BITMAP (b->global_live_at_start, 0, i, bi)
+ EXECUTE_IF_SET_IN_BITMAP (b->il.rtl->global_live_at_start, 0, i, bi)
{
if (i < FIRST_PSEUDO_REGISTER
? ! TEST_HARD_REG_BIT (eliminable_regset, i)
@@ -2345,10 +2345,10 @@ calculate_reg_pav (void)
if (pred->index != ENTRY_BLOCK)
bitmap_ior_into (bb_live_pavin, BB_INFO (pred)->live_pavout);
}
- bitmap_and_into (bb_live_pavin, bb->global_live_at_start);
+ bitmap_and_into (bb_live_pavin, bb->il.rtl->global_live_at_start);
bitmap_ior_and_compl (temp_bitmap, bb_info->avloc,
bb_live_pavin, bb_info->killed);
- bitmap_and_into (temp_bitmap, bb->global_live_at_end);
+ bitmap_and_into (temp_bitmap, bb->il.rtl->global_live_at_end);
if (! bitmap_equal_p (temp_bitmap, bb_live_pavout))
{
bitmap_copy (bb_live_pavout, temp_bitmap);
@@ -2469,8 +2469,8 @@ make_accurate_live_analysis (void)
{
bb_info = BB_INFO (bb);
- bitmap_and_into (bb->global_live_at_start, bb_info->live_pavin);
- bitmap_and_into (bb->global_live_at_end, bb_info->live_pavout);
+ bitmap_and_into (bb->il.rtl->global_live_at_start, bb_info->live_pavin);
+ bitmap_and_into (bb->il.rtl->global_live_at_end, bb_info->live_pavout);
}
free_bb_info ();
}
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index d4b66a58f7a..4480f530260 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -2364,9 +2364,9 @@ merge_if_block (struct ce_if_block * ce_info)
if (then_bb)
{
- if (combo_bb->global_live_at_end)
- COPY_REG_SET (combo_bb->global_live_at_end,
- then_bb->global_live_at_end);
+ if (combo_bb->il.rtl->global_live_at_end)
+ COPY_REG_SET (combo_bb->il.rtl->global_live_at_end,
+ then_bb->il.rtl->global_live_at_end);
merge_blocks (combo_bb, then_bb);
num_true_changes++;
}
@@ -2417,9 +2417,9 @@ merge_if_block (struct ce_if_block * ce_info)
&& join_bb != EXIT_BLOCK_PTR)
{
/* We can merge the JOIN. */
- if (combo_bb->global_live_at_end)
- COPY_REG_SET (combo_bb->global_live_at_end,
- join_bb->global_live_at_end);
+ if (combo_bb->il.rtl->global_live_at_end)
+ COPY_REG_SET (combo_bb->il.rtl->global_live_at_end,
+ join_bb->il.rtl->global_live_at_end);
merge_blocks (combo_bb, join_bb);
num_true_changes++;
@@ -3060,9 +3060,9 @@ find_if_case_1 (basic_block test_bb, edge then_edge, edge else_edge)
/* Conversion went ok, including moving the insns and fixing up the
jump. Adjust the CFG to match. */
- bitmap_ior (test_bb->global_live_at_end,
- else_bb->global_live_at_start,
- then_bb->global_live_at_end);
+ bitmap_ior (test_bb->il.rtl->global_live_at_end,
+ else_bb->il.rtl->global_live_at_start,
+ then_bb->il.rtl->global_live_at_end);
/* We can avoid creating a new basic block if then_bb is immediately
@@ -3178,9 +3178,9 @@ find_if_case_2 (basic_block test_bb, edge then_edge, edge else_edge)
/* Conversion went ok, including moving the insns and fixing up the
jump. Adjust the CFG to match. */
- bitmap_ior (test_bb->global_live_at_end,
- then_bb->global_live_at_start,
- else_bb->global_live_at_end);
+ bitmap_ior (test_bb->il.rtl->global_live_at_end,
+ then_bb->il.rtl->global_live_at_start,
+ else_bb->il.rtl->global_live_at_end);
delete_basic_block (else_bb);
@@ -3357,7 +3357,7 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
/* For TEST, we're interested in a range of insns, not a whole block.
Moreover, we're interested in the insns live from OTHER_BB. */
- COPY_REG_SET (test_live, other_bb->global_live_at_start);
+ COPY_REG_SET (test_live, other_bb->il.rtl->global_live_at_start);
pbi = init_propagate_block_info (test_bb, test_live, test_set, test_set,
0);
@@ -3373,12 +3373,13 @@ dead_or_predicable (basic_block test_bb, basic_block merge_bb,
/* We can perform the transformation if
MERGE_SET & (TEST_SET | TEST_LIVE)
and
- TEST_SET & merge_bb->global_live_at_start
+ TEST_SET & merge_bb->il.rtl->global_live_at_start
are empty. */
if (bitmap_intersect_p (test_set, merge_set)
|| bitmap_intersect_p (test_live, merge_set)
- || bitmap_intersect_p (test_set, merge_bb->global_live_at_start))
+ || bitmap_intersect_p (test_set,
+ merge_bb->il.rtl->global_live_at_start))
fail = 1;
FREE_REG_SET (tmp);
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index 78b2ede46d7..b993d35b474 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -1193,8 +1193,10 @@ update_equiv_regs (void)
{
FOR_EACH_BB (bb)
{
- AND_COMPL_REG_SET (bb->global_live_at_start, &cleared_regs);
- AND_COMPL_REG_SET (bb->global_live_at_end, &cleared_regs);
+ AND_COMPL_REG_SET (bb->il.rtl->global_live_at_start,
+ &cleared_regs);
+ AND_COMPL_REG_SET (bb->il.rtl->global_live_at_end,
+ &cleared_regs);
}
}
else
@@ -1204,8 +1206,8 @@ update_equiv_regs (void)
{
FOR_EACH_BB (bb)
{
- CLEAR_REGNO_REG_SET (bb->global_live_at_start, j);
- CLEAR_REGNO_REG_SET (bb->global_live_at_end, j);
+ CLEAR_REGNO_REG_SET (bb->il.rtl->global_live_at_start, j);
+ CLEAR_REGNO_REG_SET (bb->il.rtl->global_live_at_end, j);
}
}
}
@@ -1287,7 +1289,8 @@ block_alloc (int b)
/* Initialize table of hardware registers currently live. */
- REG_SET_TO_HARD_REG_SET (regs_live, BASIC_BLOCK (b)->global_live_at_start);
+ REG_SET_TO_HARD_REG_SET (regs_live,
+ BASIC_BLOCK (b)->il.rtl->global_live_at_start);
/* This loop scans the instructions of the basic block
and assigns quantities to registers.
diff --git a/gcc/mode-switching.c b/gcc/mode-switching.c
index c66fd3c5998..968061c2482 100644
--- a/gcc/mode-switching.c
+++ b/gcc/mode-switching.c
@@ -219,7 +219,7 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
if (eg->flags & EDGE_FALLTHRU)
{
basic_block src_bb = eg->src;
- regset live_at_end = src_bb->global_live_at_end;
+ regset live_at_end = src_bb->il.rtl->global_live_at_end;
rtx last_insn, ret_reg;
gcc_assert (!pre_exit);
@@ -368,8 +368,8 @@ create_pre_exit (int n_entities, int *entity_map, const int *num_modes)
else
{
pre_exit = split_edge (eg);
- COPY_REG_SET (pre_exit->global_live_at_start, live_at_end);
- COPY_REG_SET (pre_exit->global_live_at_end, live_at_end);
+ COPY_REG_SET (pre_exit->il.rtl->global_live_at_start, live_at_end);
+ COPY_REG_SET (pre_exit->il.rtl->global_live_at_end, live_at_end);
}
}
@@ -453,7 +453,7 @@ optimize_mode_switching (FILE *file)
HARD_REG_SET live_now;
REG_SET_TO_HARD_REG_SET (live_now,
- bb->global_live_at_start);
+ bb->il.rtl->global_live_at_start);
for (insn = BB_HEAD (bb);
insn != NULL && insn != NEXT_INSN (BB_END (bb));
insn = NEXT_INSN (insn))
@@ -583,7 +583,7 @@ optimize_mode_switching (FILE *file)
src_bb = eg->src;
REG_SET_TO_HARD_REG_SET (live_at_edge,
- src_bb->global_live_at_end);
+ src_bb->il.rtl->global_live_at_end);
start_sequence ();
EMIT_MODE_SET (entity_map[j], mode, live_at_edge);
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 3d9b24bd113..d469b89f427 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -739,9 +739,9 @@ reload_combine (void)
HARD_REG_SET live;
REG_SET_TO_HARD_REG_SET (live,
- bb->global_live_at_start);
+ bb->il.rtl->global_live_at_start);
compute_use_by_pseudos (&live,
- bb->global_live_at_start);
+ bb->il.rtl->global_live_at_start);
COPY_HARD_REG_SET (LABEL_LIVE (insn), live);
IOR_HARD_REG_SET (ever_live_at_start, live);
}
diff --git a/gcc/recog.c b/gcc/recog.c
index 836ebb3eabd..2095ca018f6 100644
--- a/gcc/recog.c
+++ b/gcc/recog.c
@@ -3066,7 +3066,7 @@ peephole2_optimize (FILE *dump_file ATTRIBUTE_UNUSED)
peep2_current = MAX_INSNS_PER_PEEP2;
/* Start up propagation. */
- COPY_REG_SET (live, bb->global_live_at_end);
+ COPY_REG_SET (live, bb->il.rtl->global_live_at_end);
COPY_REG_SET (peep2_insn_data[MAX_INSNS_PER_PEEP2].live_before, live);
#ifdef HAVE_conditional_execution
@@ -3278,7 +3278,7 @@ peephole2_optimize (FILE *dump_file ATTRIBUTE_UNUSED)
/* Some peepholes can decide the don't need one or more of their
inputs. If this happens, local life update is not enough. */
- EXECUTE_IF_AND_COMPL_IN_BITMAP (bb->global_live_at_start, live,
+ EXECUTE_IF_AND_COMPL_IN_BITMAP (bb->il.rtl->global_live_at_start, live,
0, j, rsi)
{
do_global_life_update = true;
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index 7ee3be2d010..e3753934952 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -3077,9 +3077,9 @@ reg_to_stack (FILE *file)
/* Copy live_at_end and live_at_start into temporaries. */
for (reg = FIRST_STACK_REG; reg <= LAST_STACK_REG; reg++)
{
- if (REGNO_REG_SET_P (bb->global_live_at_end, reg))
+ if (REGNO_REG_SET_P (bb->il.rtl->global_live_at_end, reg))
SET_HARD_REG_BIT (bi->out_reg_set, reg);
- if (REGNO_REG_SET_P (bb->global_live_at_start, reg))
+ if (REGNO_REG_SET_P (bb->il.rtl->global_live_at_start, reg))
SET_HARD_REG_BIT (bi->stack_in.reg_set, reg);
}
}
diff --git a/gcc/regmove.c b/gcc/regmove.c
index c55a74f76ce..862a4c4ea8f 100644
--- a/gcc/regmove.c
+++ b/gcc/regmove.c
@@ -266,7 +266,7 @@ mark_flags_life_zones (rtx flags)
{
int i;
for (i = 0; i < flags_nregs; ++i)
- live |= REGNO_REG_SET_P (block->global_live_at_start,
+ live |= REGNO_REG_SET_P (block->il.rtl->global_live_at_start,
flags_regno + i);
}
#endif
diff --git a/gcc/regrename.c b/gcc/regrename.c
index 1f0bafde116..89e7bbb04aa 100644
--- a/gcc/regrename.c
+++ b/gcc/regrename.c
@@ -142,7 +142,7 @@ merge_overlapping_regs (basic_block b, HARD_REG_SET *pset,
rtx insn;
HARD_REG_SET live;
- REG_SET_TO_HARD_REG_SET (live, b->global_live_at_start);
+ REG_SET_TO_HARD_REG_SET (live, b->il.rtl->global_live_at_start);
insn = BB_HEAD (b);
while (t)
{
diff --git a/gcc/reload.c b/gcc/reload.c
index 9f10321d9c6..fe4b3ac2077 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -1537,7 +1537,7 @@ push_reload (rtx in, rtx out, rtx *inloc, rtx *outloc,
/* Check that we don't use a hardreg for an uninitialized
pseudo. See also find_dummy_reload(). */
&& (ORIGINAL_REGNO (XEXP (note, 0)) < FIRST_PSEUDO_REGISTER
- || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
+ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end,
ORIGINAL_REGNO (XEXP (note, 0))))
&& ! refers_to_regno_for_reload_p (regno,
(regno
@@ -2011,7 +2011,7 @@ find_dummy_reload (rtx real_in, rtx real_out, rtx *inloc, rtx *outloc,
as they would clobber the other live pseudo using the same.
See also PR20973. */
&& (ORIGINAL_REGNO (in) < FIRST_PSEUDO_REGISTER
- || ! bitmap_bit_p (ENTRY_BLOCK_PTR->global_live_at_end,
+ || ! bitmap_bit_p (ENTRY_BLOCK_PTR->il.rtl->global_live_at_end,
ORIGINAL_REGNO (in))))
{
unsigned int regno = REGNO (in) + in_offset;
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 3176dcae6d2..6a94530cc8b 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -1079,7 +1079,7 @@ reload (rtx first, int global)
if (! frame_pointer_needed)
FOR_EACH_BB (bb)
- CLEAR_REGNO_REG_SET (bb->global_live_at_start,
+ CLEAR_REGNO_REG_SET (bb->il.rtl->global_live_at_start,
HARD_FRAME_POINTER_REGNUM);
/* Come here (with failure set nonzero) if we can't get enough spill
diff --git a/gcc/resource.c b/gcc/resource.c
index 6d7bf5f587f..eae4cf9f553 100644
--- a/gcc/resource.c
+++ b/gcc/resource.c
@@ -965,7 +965,7 @@ mark_target_live_regs (rtx insns, rtx target, struct resources *res)
TARGET. Otherwise, we must assume everything is live. */
if (b != -1)
{
- regset regs_live = BASIC_BLOCK (b)->global_live_at_start;
+ regset regs_live = BASIC_BLOCK (b)->il.rtl->global_live_at_start;
unsigned int j;
unsigned int regno;
rtx start_insn, stop_insn;
diff --git a/gcc/sched-ebb.c b/gcc/sched-ebb.c
index 560faf3620f..20520dd074b 100644
--- a/gcc/sched-ebb.c
+++ b/gcc/sched-ebb.c
@@ -183,9 +183,9 @@ compute_jump_reg_dependencies (rtx insn, regset cond_set, regset used,
it may guard the fallthrough block from using a value that has
conditionally overwritten that of the main codepath. So we
consider that it restores the value of the main codepath. */
- bitmap_and (set, e->dest->global_live_at_start, cond_set);
+ bitmap_and (set, e->dest->il.rtl->global_live_at_start, cond_set);
else
- bitmap_ior_into (used, e->dest->global_live_at_start);
+ bitmap_ior_into (used, e->dest->il.rtl->global_live_at_start);
}
/* Used in schedule_insns to initialize current_sched_info for scheduling
diff --git a/gcc/sched-rgn.c b/gcc/sched-rgn.c
index 4196e6d7e93..edaf79627db 100644
--- a/gcc/sched-rgn.c
+++ b/gcc/sched-rgn.c
@@ -1184,7 +1184,8 @@ check_live_1 (int src, rtx x)
{
basic_block b = candidate_table[src].split_bbs.first_member[i];
- if (REGNO_REG_SET_P (b->global_live_at_start, regno + j))
+ if (REGNO_REG_SET_P (b->il.rtl->global_live_at_start,
+ regno + j))
{
return 0;
}
@@ -1198,7 +1199,7 @@ check_live_1 (int src, rtx x)
{
basic_block b = candidate_table[src].split_bbs.first_member[i];
- if (REGNO_REG_SET_P (b->global_live_at_start, regno))
+ if (REGNO_REG_SET_P (b->il.rtl->global_live_at_start, regno))
{
return 0;
}
@@ -1257,7 +1258,8 @@ update_live_1 (int src, rtx x)
{
basic_block b = candidate_table[src].update_bbs.first_member[i];
- SET_REGNO_REG_SET (b->global_live_at_start, regno + j);
+ SET_REGNO_REG_SET (b->il.rtl->global_live_at_start,
+ regno + j);
}
}
}
@@ -1267,7 +1269,7 @@ update_live_1 (int src, rtx x)
{
basic_block b = candidate_table[src].update_bbs.first_member[i];
- SET_REGNO_REG_SET (b->global_live_at_start, regno);
+ SET_REGNO_REG_SET (b->il.rtl->global_live_at_start, regno);
}
}
}