diff options
author | Jakub Jelinek <jakub@redhat.com> | 2010-03-12 14:27:43 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2010-03-12 14:27:43 +0100 |
commit | 0de3e43f1ff4f954f0eeda17024772d751e87866 (patch) | |
tree | e12fe17c4daff632e72812078a4cb3dd45be7118 /gcc/cselib.c | |
parent | 70235ab941c572a4efabd15fcf737c22fc999814 (diff) | |
download | gcc-0de3e43f1ff4f954f0eeda17024772d751e87866.zip gcc-0de3e43f1ff4f954f0eeda17024772d751e87866.tar.gz gcc-0de3e43f1ff4f954f0eeda17024772d751e87866.tar.bz2 |
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
Diffstat (limited to 'gcc/cselib.c')
-rw-r--r-- | gcc/cselib.c | 43 |
1 files changed, 2 insertions, 41 deletions
diff --git a/gcc/cselib.c b/gcc/cselib.c index 515fc32..f63ea3f 100644 --- a/gcc/cselib.c +++ b/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]); |