cselib.c (LONG_TERM_PRESERVED_VALUE_P): Remove.
* cselib.c (LONG_TERM_PRESERVED_VALUE_P): Remove. (cselib_preserve_definitely, cselib_clear_preserve): Remove. (cselib_preserve_only_values): Remove retain argument, don't traverse hash table with cselib_{preserve_definitely,clear_preserve}. * cselib.h (cselib_preserve_only_values): Remove retain argument. * var-tracking.c (micro_operation): Move insn field before union. Add DEF_VEC_O and DEF_VEC_ALLOC_O for this type. (struct variable_tracking_info_def): Remove n_mos field, change mos into a vector of micro_operations. (count_uses, count_uses_1, count_stores, count_with_sets): Remove. (bb_stack_adjust_offset, log_op_type, add_uses, add_stores, compute_bb_dataflow, emit_notes_in_bb): Adjust for VTI (bb)->mos changing into a vector. (add_with_sets): Likewise. Ensure MO_VAL_USE uops from add_stores come before all other uops generated by add_stores. (vt_add_function_parameters): Adjust for cselib_preserve_only_values argument removal. (vt_initialize): Likewise. Adjust for VTI (bb)->mos changing into a vector. Run just one pass over the bbs instead of separate counting and computation phase. (vt_finalize): Free VTI (bb)->mos vector instead of array. From-SVN: r157403
This commit is contained in:
parent
70235ab941
commit
0de3e43f1f
4 changed files with 214 additions and 422 deletions
|
@ -1,5 +1,27 @@
|
|||
2010-03-12 Jakub Jelinek <jakub@redhat.com>
|
||||
|
||||
* cselib.c (LONG_TERM_PRESERVED_VALUE_P): Remove.
|
||||
(cselib_preserve_definitely, cselib_clear_preserve): Remove.
|
||||
(cselib_preserve_only_values): Remove retain argument, don't
|
||||
traverse hash table with cselib_{preserve_definitely,clear_preserve}.
|
||||
* cselib.h (cselib_preserve_only_values): Remove retain argument.
|
||||
* var-tracking.c (micro_operation): Move insn field before union.
|
||||
Add DEF_VEC_O and DEF_VEC_ALLOC_O for this type.
|
||||
(struct variable_tracking_info_def): Remove n_mos field, change
|
||||
mos into a vector of micro_operations.
|
||||
(count_uses, count_uses_1, count_stores, count_with_sets): Remove.
|
||||
(bb_stack_adjust_offset, log_op_type, add_uses, add_stores,
|
||||
compute_bb_dataflow, emit_notes_in_bb): Adjust for VTI (bb)->mos
|
||||
changing into a vector.
|
||||
(add_with_sets): Likewise. Ensure MO_VAL_USE uops from add_stores
|
||||
come before all other uops generated by add_stores.
|
||||
(vt_add_function_parameters): Adjust for cselib_preserve_only_values
|
||||
argument removal.
|
||||
(vt_initialize): Likewise. Adjust for VTI (bb)->mos changing into
|
||||
a vector. Run just one pass over the bbs instead of separate counting
|
||||
and computation phase.
|
||||
(vt_finalize): Free VTI (bb)->mos vector instead of array.
|
||||
|
||||
PR debug/43329
|
||||
* tree-inline.c (remap_decls): Put old_var rather than origin_var
|
||||
into *nonlocalized_list vector.
|
||||
|
|
43
gcc/cselib.c
43
gcc/cselib.c
|
@ -1,6 +1,6 @@
|
|||
/* Common subexpression elimination library for GNU compiler.
|
||||
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
|
||||
1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009
|
||||
1999, 2000, 2001, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
|
||||
Free Software Foundation, Inc.
|
||||
|
||||
This file is part of GCC.
|
||||
|
@ -155,8 +155,6 @@ void (*cselib_record_sets_hook) (rtx insn, struct cselib_set *sets,
|
|||
|
||||
#define PRESERVED_VALUE_P(RTX) \
|
||||
(RTL_FLAG_CHECK1("PRESERVED_VALUE_P", (RTX), VALUE)->unchanging)
|
||||
#define LONG_TERM_PRESERVED_VALUE_P(RTX) \
|
||||
(RTL_FLAG_CHECK1("LONG_TERM_PRESERVED_VALUE_P", (RTX), VALUE)->in_struct)
|
||||
|
||||
|
||||
|
||||
|
@ -436,51 +434,14 @@ cselib_preserved_value_p (cselib_val *v)
|
|||
return PRESERVED_VALUE_P (v->val_rtx);
|
||||
}
|
||||
|
||||
/* Mark preserved values as preserved for the long term. */
|
||||
|
||||
static int
|
||||
cselib_preserve_definitely (void **slot, void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
cselib_val *v = (cselib_val *)*slot;
|
||||
|
||||
if (PRESERVED_VALUE_P (v->val_rtx)
|
||||
&& !LONG_TERM_PRESERVED_VALUE_P (v->val_rtx))
|
||||
LONG_TERM_PRESERVED_VALUE_P (v->val_rtx) = true;
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Clear the preserve marks for values not preserved for the long
|
||||
term. */
|
||||
|
||||
static int
|
||||
cselib_clear_preserve (void **slot, void *info ATTRIBUTE_UNUSED)
|
||||
{
|
||||
cselib_val *v = (cselib_val *)*slot;
|
||||
|
||||
if (PRESERVED_VALUE_P (v->val_rtx)
|
||||
&& !LONG_TERM_PRESERVED_VALUE_P (v->val_rtx))
|
||||
{
|
||||
PRESERVED_VALUE_P (v->val_rtx) = false;
|
||||
if (!v->locs)
|
||||
n_useless_values++;
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Clean all non-constant expressions in the hash table, but retain
|
||||
their values. */
|
||||
|
||||
void
|
||||
cselib_preserve_only_values (bool retain)
|
||||
cselib_preserve_only_values (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
htab_traverse (cselib_hash_table,
|
||||
retain ? cselib_preserve_definitely : cselib_clear_preserve,
|
||||
NULL);
|
||||
|
||||
for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
|
||||
cselib_invalidate_regno (i, reg_raw_mode[i]);
|
||||
|
||||
|
|
|
@ -91,6 +91,6 @@ extern void cselib_reset_table (unsigned int);
|
|||
extern unsigned int cselib_get_next_uid (void);
|
||||
extern void cselib_preserve_value (cselib_val *);
|
||||
extern bool cselib_preserved_value_p (cselib_val *);
|
||||
extern void cselib_preserve_only_values (bool);
|
||||
extern void cselib_preserve_only_values (void);
|
||||
|
||||
extern void dump_cselib_table (FILE *);
|
||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Add table
Reference in a new issue