diff options
author | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-24 19:03:33 +0000 |
---|---|---|
committer | rsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-01-24 19:03:33 +0000 |
commit | 376a287d5002e5e9a5ed836fd2104d6f0292a09b (patch) | |
tree | 6defecb75ee127af1ec9e7ad8fbce045bbce65f5 /gcc/cse.c | |
parent | 39ca90d51f0c4282d89cbcaa9d1153e44d048133 (diff) | |
download | gcc-376a287d5002e5e9a5ed836fd2104d6f0292a09b.tar.gz |
gcc/
* rtl.h (true_dependence, canon_true_dependence): Remove varies
parameter.
* alias.c (fixed_scalar_and_varying_struct_p): Delete.
(true_dependence_1, write_dependence_p, may_alias_p): Don't call it.
(true_dependence_1, true_dependence, canon_true_dependence): Remove
varies parameter.
* cselib.c (cselib_rtx_varies_p): Delete.
(cselib_invalidate_mem): Update call to canon_true_dependence.
* dse.c (record_store, check_mem_read_rtx): Likewise.
(scan_reads_nospill): Likewise.
* cse.c (check_dependence): Likewise.
(cse_rtx_varies_p): Delete.
* expr.c (safe_from_p): Update call to true_dependence.
* ira.c (validate_equiv_mem_from_store): Likewise.
(memref_referenced_p): Likewise.
* postreload-gcse.c (find_mem_conflicts): Likewise.
* sched-deps.c (sched_analyze_2): Likewise.
* store-motion.c (load_kills_store): Likewise.
* config/frv/frv.c (frv_registers_conflict_p_1): Likewise.
* gcse.c (mems_conflict_for_gcse_p): Likewise.
(compute_transp): Update call to canon_true_dependence.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@183485 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 65 |
1 files changed, 1 insertions, 64 deletions
diff --git a/gcc/cse.c b/gcc/cse.c index e624b2828bc..6424bb1864f 100644 --- a/gcc/cse.c +++ b/gcc/cse.c @@ -573,7 +573,6 @@ static struct table_elt *insert (rtx, struct table_elt *, unsigned, enum machine_mode); static void merge_equiv_classes (struct table_elt *, struct table_elt *); static void invalidate (rtx, enum machine_mode); -static bool cse_rtx_varies_p (const_rtx, bool); static void remove_invalid_refs (unsigned int); static void remove_invalid_subreg_refs (unsigned int, unsigned int, enum machine_mode); @@ -1846,8 +1845,7 @@ check_dependence (rtx *x, void *data) { struct check_dependence_data *d = (struct check_dependence_data *) data; if (*x && MEM_P (*x)) - return canon_true_dependence (d->exp, d->mode, d->addr, *x, NULL_RTX, - cse_rtx_varies_p); + return canon_true_dependence (d->exp, d->mode, d->addr, *x, NULL_RTX); else return 0; } @@ -2794,67 +2792,6 @@ exp_equiv_p (const_rtx x, const_rtx y, int validate, bool for_gcse) return 1; } -/* Return 1 if X has a value that can vary even between two - executions of the program. 0 means X can be compared reliably - against certain constants or near-constants. */ - -static bool -cse_rtx_varies_p (const_rtx x, bool from_alias) -{ - /* We need not check for X and the equivalence class being of the same - mode because if X is equivalent to a constant in some mode, it - doesn't vary in any mode. */ - - if (REG_P (x) - && REGNO_QTY_VALID_P (REGNO (x))) - { - int x_q = REG_QTY (REGNO (x)); - struct qty_table_elem *x_ent = &qty_table[x_q]; - - if (GET_MODE (x) == x_ent->mode - && x_ent->const_rtx != NULL_RTX) - return 0; - } - - if (GET_CODE (x) == PLUS - && CONST_INT_P (XEXP (x, 1)) - && REG_P (XEXP (x, 0)) - && REGNO_QTY_VALID_P (REGNO (XEXP (x, 0)))) - { - int x0_q = REG_QTY (REGNO (XEXP (x, 0))); - struct qty_table_elem *x0_ent = &qty_table[x0_q]; - - if ((GET_MODE (XEXP (x, 0)) == x0_ent->mode) - && x0_ent->const_rtx != NULL_RTX) - return 0; - } - - /* This can happen as the result of virtual register instantiation, if - the initial constant is too large to be a valid address. This gives - us a three instruction sequence, load large offset into a register, - load fp minus a constant into a register, then a MEM which is the - sum of the two `constant' registers. */ - if (GET_CODE (x) == PLUS - && REG_P (XEXP (x, 0)) - && REG_P (XEXP (x, 1)) - && REGNO_QTY_VALID_P (REGNO (XEXP (x, 0))) - && REGNO_QTY_VALID_P (REGNO (XEXP (x, 1)))) - { - int x0_q = REG_QTY (REGNO (XEXP (x, 0))); - int x1_q = REG_QTY (REGNO (XEXP (x, 1))); - struct qty_table_elem *x0_ent = &qty_table[x0_q]; - struct qty_table_elem *x1_ent = &qty_table[x1_q]; - - if ((GET_MODE (XEXP (x, 0)) == x0_ent->mode) - && x0_ent->const_rtx != NULL_RTX - && (GET_MODE (XEXP (x, 1)) == x1_ent->mode) - && x1_ent->const_rtx != NULL_RTX) - return 0; - } - - return rtx_varies_p (x, from_alias); -} - /* Subroutine of canon_reg. Pass *XLOC through canon_reg, and validate the result if necessary. INSN is as for canon_reg. */ |