* df-scan.c (persistent_obstack, df_invalidated_by_call): Remove.
(df_scan_start_dump, df_get_call_refs, df_hard_reg_init): Rename
df_invalidated_by_call to invalidated_by_call_regset.
* df.h (df_invalidated_by_call): Remove.
* regclass.c (regs_invalidated_by_call_regset, persistent_obstack): New
variables.
(init_reg_sets_1): Initialize regs_invalidated_by_call_regset.
(globalize_reg): Likewise.
* df-problems.c (df_rd_local_compute, df_lr_confluence_n,
df_byte_lr_alloc): Rename df_invalidated_by_call to
invalidated_by_call_regset.
* basic-block.h (regs_invalidated_by_call_regset): Declare.
Co-Authored-By: Kai Tietz <kai.tietz@onevision.com>
From-SVN: r142812
+2008-12-18 Jan Hubicka <jh@suse.cz>
+ Kai Tietz <kai.tietz@onevision.com>
+
+ * df-scan.c (persistent_obstack, df_invalidated_by_call): Remove.
+ (df_scan_start_dump, df_get_call_refs, df_hard_reg_init): Rename
+ df_invalidated_by_call to invalidated_by_call_regset.
+ * df.h (df_invalidated_by_call): Remove.
+ * regclass.c (regs_invalidated_by_call_regset, persistent_obstack): New
+ variables.
+ (init_reg_sets_1): Initialize regs_invalidated_by_call_regset.
+ (globalize_reg): Likewise.
+ * df-problems.c (df_rd_local_compute, df_lr_confluence_n,
+ df_byte_lr_alloc): Rename df_invalidated_by_call to
+ invalidated_by_call_regset.
+ * basic-block.h (regs_invalidated_by_call_regset): Declare.
+
2008-12-18 Jan Hubicka <jh@suse.cz>
Kai Tietz <kai.tietz@onevision.com>
#define EXECUTE_IF_AND_IN_REG_SET(REGSET1, REGSET2, MIN, REGNUM, RSI) \
EXECUTE_IF_AND_IN_BITMAP (REGSET1, REGSET2, MIN, REGNUM, RSI) \
+/* Same information as REGS_INVALIDATED_BY_CALL but in regset form to be used
+ in dataflow more conveniently. */
+
+extern regset regs_invalidated_by_call_regset;
+
/* Type we use to hold basic block counters. Should be at least
64bit. Although a counter cannot be negative, we use a signed
type, because erroneous negative counts can be generated when the
}
/* Set up the knockout bit vectors to be applied across EH_EDGES. */
- EXECUTE_IF_SET_IN_BITMAP (df_invalidated_by_call, 0, regno, bi)
+ EXECUTE_IF_SET_IN_BITMAP (regs_invalidated_by_call_regset, 0, regno, bi)
{
if (DF_DEFS_COUNT (regno) > DF_SPARSE_THRESHOLD)
bitmap_set_bit (sparse_invalidated, regno);
/* ??? Abnormal call edges ignored for the moment, as this gets
confused by sibling call edges, which crashes reg-stack. */
if (e->flags & EDGE_EH)
- bitmap_ior_and_compl_into (op1, op2, df_invalidated_by_call);
+ bitmap_ior_and_compl_into (op1, op2, regs_invalidated_by_call_regset);
else
bitmap_ior_into (op1, op2);
df_byte_lr_expand_bitmap (problem_data->hardware_regs_used,
df->hardware_regs_used);
df_byte_lr_expand_bitmap (problem_data->invalidated_by_call,
- df_invalidated_by_call);
+ regs_invalidated_by_call_regset);
EXECUTE_IF_SET_IN_BITMAP (df_byte_lr->out_of_date_transfer_functions, 0, bb_index, bi)
{
free (V); \
} while (0)
-/* The bitmap_obstack is used to hold some static variables that
- should not be reset after each function is compiled. */
-
-static bitmap_obstack persistent_obstack;
-
/* The set of hard registers in eliminables[i].from. */
static HARD_REG_SET elim_reg_set;
-/* This is a bitmap copy of regs_invalidated_by_call so that we can
- easily add it into bitmaps, etc. */
-
-bitmap df_invalidated_by_call = NULL;
-
/* Initialize ur_in and ur_out as if all hard registers were partially
available. */
rtx insn;
fprintf (file, ";; invalidated by call \t");
- df_print_regset (file, df_invalidated_by_call);
+ df_print_regset (file, regs_invalidated_by_call_regset);
fprintf (file, ";; hardware regs used \t");
df_print_regset (file, df->hardware_regs_used);
fprintf (file, ";; regular block artificial uses \t");
}
is_sibling_call = SIBLING_CALL_P (insn_info->insn);
- EXECUTE_IF_SET_IN_BITMAP (df_invalidated_by_call, 0, ui, bi)
+ EXECUTE_IF_SET_IN_BITMAP (regs_invalidated_by_call_regset, 0, ui, bi)
{
if (!global_regs[ui]
&& (!bitmap_bit_p (defs_generated, ui))
if (initialized)
return;
- bitmap_obstack_initialize (&persistent_obstack);
-
/* Record which registers will be eliminated. We use this in
mark_used_regs. */
CLEAR_HARD_REG_SET (elim_reg_set);
SET_HARD_REG_BIT (elim_reg_set, FRAME_POINTER_REGNUM);
#endif
- df_invalidated_by_call = BITMAP_ALLOC (&persistent_obstack);
-
- /* Inconveniently, this is only readily available in hard reg set
- form. */
- for (i = 0; i < FIRST_PSEUDO_REGISTER; ++i)
- if (TEST_HARD_REG_BIT (regs_invalidated_by_call, i))
- bitmap_set_bit (df_invalidated_by_call, i);
-
initialized = true;
}
extern bitmap_obstack df_bitmap_obstack;
-/* This is a bitmap copy of regs_invalidated_by_call so that we can
- easily add it into bitmaps, etc. */
-
-extern bitmap df_invalidated_by_call;
-
/* One of these structures is allocated for every basic block. */
struct df_scan_bb_info
HARD_REG_SET regs_invalidated_by_call;
+/* Same information as REGS_INVALIDATED_BY_CALL but in regset form to be used
+ in dataflow more conveniently. */
+
+regset regs_invalidated_by_call_regset;
+
+/* The bitmap_obstack is used to hold some static variables that
+ should not be reset after each function is compiled. */
+
+static bitmap_obstack persistent_obstack;
+
/* Table of register numbers in the order in which to try to use them. */
#ifdef REG_ALLOC_ORDER
int reg_alloc_order[FIRST_PSEUDO_REGISTER] = REG_ALLOC_ORDER;
CLEAR_HARD_REG_SET (call_fixed_reg_set);
CLEAR_HARD_REG_SET (regs_invalidated_by_call);
CLEAR_HARD_REG_SET (losing_caller_save_reg_set);
+ if (!regs_invalidated_by_call_regset)
+ {
+ bitmap_obstack_initialize (&persistent_obstack);
+ regs_invalidated_by_call_regset = ALLOC_REG_SET (&persistent_obstack);
+ }
+ else
+ CLEAR_REG_SET (regs_invalidated_by_call_regset);
memcpy (call_fixed_regs, fixed_regs, sizeof call_fixed_regs);
if (i == STACK_POINTER_REGNUM)
;
else if (global_regs[i])
- SET_HARD_REG_BIT (regs_invalidated_by_call, i);
+ {
+ SET_HARD_REG_BIT (regs_invalidated_by_call, i);
+ SET_REGNO_REG_SET (regs_invalidated_by_call_regset, i);
+ }
else if (i == FRAME_POINTER_REGNUM)
;
#if HARD_FRAME_POINTER_REGNUM != FRAME_POINTER_REGNUM
;
#endif
else if (CALL_REALLY_USED_REGNO_P (i))
- SET_HARD_REG_BIT (regs_invalidated_by_call, i);
+ {
+ SET_HARD_REG_BIT (regs_invalidated_by_call, i);
+ SET_REGNO_REG_SET (regs_invalidated_by_call_regset, i);
+ }
}
/* Preserve global registers if called more than once. */
appropriate regs_invalidated_by_call bit, even if it's already
set in fixed_regs. */
if (i != STACK_POINTER_REGNUM)
- SET_HARD_REG_BIT (regs_invalidated_by_call, i);
+ {
+ SET_HARD_REG_BIT (regs_invalidated_by_call, i);
+ SET_REGNO_REG_SET (regs_invalidated_by_call_regset, i);
+ }
/* If already fixed, nothing else to do. */
if (fixed_regs[i])