summaryrefslogtreecommitdiff
path: root/gcc/lra-remat.c
diff options
context:
space:
mode:
authorvmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-02 16:07:36 +0000
committervmakarov <vmakarov@138bc75d-0d04-0410-961f-82ee72b054a4>2016-08-02 16:07:36 +0000
commitab4ea053bf71c5571df344d5d5f5bd7ecc5ede8e (patch)
tree7c2848d5a635da4f8a9ad968219e25a2afa416ff /gcc/lra-remat.c
parentfa6c06f5770c0a5c0018533ea57abaefa0e99153 (diff)
downloadgcc-ab4ea053bf71c5571df344d5d5f5bd7ecc5ede8e.tar.gz
2016-08-02 Vladimir Makarov <vmakarov@redhat.com>
PR rtl-optimization/69847 * lra-int.h (struct lra-reg): Use restore_rtx instead of restore_regno. (lra_rtx_hash): New. * lra.c (initialize_lra_reg_info_element): Use restore_rtx instead of restore_regno. (lra_rtx_hash): Rename and move lra-remat.c::rtx_hash. * lra-remat.c (rtx_hash): Rename and Move to lra.c. * lra-spills.c (lra_final_code_change): Don't delete insn when the next insn is USE with the same reg as the current insn source. * lra-constraints.c (curr_insn_transform): Use restore_rtx instead of restore_regno. (lra_constraints_init): Call initiate_invariants. (lra_constraints_finish): Call finish_invariants. (struct invariant, invariant_t, invariant_ptr_t): New. (const_invariant_ptr_t, invariants, invariants_pool): New. (invariant_table, invariant_hash, invariant_eq_p): New. (insert_invariant, initiate_invariants, finish_invariants): New. (clear_invariants, invalid_invariant_regs): New. (inherit_reload_reg, split_reg, fix_bb_live_info): Use restore_rtx instead of restore_regno. (invariant_p, process_invariant_for_inheritance): New. (inherit_in_ebb): Implement invariant inheritance. (lra_inheritance): Initialize and finalize invalid_invariant_regs. (remove_inheritance_pseudos): Implement undoing invariant inheritance. (undo_optional_reloads, lra_undo_inheritance): Use restore_rtx instead of restore_regno. * lra-assigns.c (regno_live_length): New. (reload_pseudo_compare_func): Use regno_live_length. (assign_by_spills): Use restore_rtx instead of restore_regno. (lra_assign): Ditto. Initiate regno_live_length. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@238991 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/lra-remat.c')
-rw-r--r--gcc/lra-remat.c86
1 files changed, 0 insertions, 86 deletions
diff --git a/gcc/lra-remat.c b/gcc/lra-remat.c
index 187ee3e7752..c124d5ba2e1 100644
--- a/gcc/lra-remat.c
+++ b/gcc/lra-remat.c
@@ -167,92 +167,6 @@ get_remat_bb_data_by_index (int index)
-/* Recursive hash function for RTL X. */
-static hashval_t
-rtx_hash (rtx x)
-{
- int i, j;
- enum rtx_code code;
- const char *fmt;
- hashval_t val = 0;
-
- if (x == 0)
- return val;
-
- code = GET_CODE (x);
- val += (int) code + 4095;
-
- /* Some RTL can be compared nonrecursively. */
- switch (code)
- {
- case REG:
- return val + REGNO (x);
-
- case LABEL_REF:
- return iterative_hash_object (XEXP (x, 0), val);
-
- case SYMBOL_REF:
- return iterative_hash_object (XSTR (x, 0), val);
-
- case SCRATCH:
- case CONST_DOUBLE:
- case CONST_INT:
- case CONST_VECTOR:
- return val;
-
- default:
- break;
- }
-
- /* Hash the elements. */
- fmt = GET_RTX_FORMAT (code);
- for (i = GET_RTX_LENGTH (code) - 1; i >= 0; i--)
- {
- switch (fmt[i])
- {
- case 'w':
- val += XWINT (x, i);
- break;
-
- case 'n':
- case 'i':
- val += XINT (x, i);
- break;
-
- case 'V':
- case 'E':
- val += XVECLEN (x, i);
-
- for (j = 0; j < XVECLEN (x, i); j++)
- val += rtx_hash (XVECEXP (x, i, j));
- break;
-
- case 'e':
- val += rtx_hash (XEXP (x, i));
- break;
-
- case 'S':
- case 's':
- val += htab_hash_string (XSTR (x, i));
- break;
-
- case 'u':
- case '0':
- case 't':
- break;
-
- /* It is believed that rtx's at this level will never
- contain anything but integers and other rtx's, except for
- within LABEL_REFs and SYMBOL_REFs. */
- default:
- abort ();
- }
- }
- return val;
-}
-
-
-
/* Hash table for the candidates. Different insns (e.g. structurally
the same insns or even insns with different unused output regs) can
be represented by the same candidate in the table. */