Lines Matching defs:HASH
65 a hash table for most expressions, and a vector of "quantity
75 is to keep it in a hash table.
104 REG expressions with qty_table `mode' must be in the hash table for both
108 any mode, two REG expressions might be equivalent in the hash table
116 putting the constant in the hash table as is usual for non-regs.
129 is recorded in the hash table along with the actual RTL
135 we use a hash table called `table'. It has a fixed number of buckets
138 hash codes.
145 The hash code of a register reference is computed using the quantity
149 hash table not just that expression but all expressions whose values
169 Because searching the entire hash table for expressions that contain
172 entered in the hash table using this register, and then the value has
188 Registers themselves are entered in the hash table as well as in
295 valid in the hash table. If this does not equal the current
296 reg_tick value, such expressions existing in the hash table are
323 currently a REG expression in the hash table. Note the difference
336 /* True if we put a LABEL_REF into the hash table for an INSN
351 /* The hash table contains buckets which are chains of `struct table_elt's,
358 Those elements with the same hash code are chained in both directions
416 things stored in the hash table, and a lot of buckets slows
422 /* Compute hash code of X in mode M. Special-case case where X is a pseudo
425 #define HASH(X, M) \
430 /* Like HASH, but without side-effects. */
801 /* Clear the hash table and initialize each register with its own quantity,
814 /* Clear out hash table state for this pass. */
834 /* Now relink this hash entire chain into
959 /* Remove any invalid expressions from the hash table
968 Return 1 if we have done something that may have changed the hash code
1031 hash code and not found in the table after that call.
1068 /* Update the register quantities for inserting X into the hash table
1076 so X's hash code may be different. */
1151 not be accessible because its hash code will have changed. So assign
1196 unsigned hash;
1201 hash = HASH (anchor_exp, mode);
1202 elt = lookup (anchor_exp, hash, mode);
1204 elt = insert (anchor_exp, NULL, hash, mode);
1207 /* REG has just been inserted and the hash codes recomputed. */
1209 hash = HASH (exp, mode);
1218 insert_with_costs (exp, elt, hash, mode, COST (reg, mode), 1);
1322 lower_elt = lookup (lower_anchor_rtx, HASH (lower_anchor_rtx, mode), mode);
1323 upper_elt = lookup (upper_anchor_rtx, HASH (upper_anchor_rtx, mode), mode);
1340 /* Look in or update the hash table. */
1343 HASH is its hash code, made using the HASH macro.
1348 remove_from_table (struct table_elt *elt, unsigned int hash)
1378 /* Remove the table element from its hash bucket. */
1389 else if (table[hash] == elt)
1390 table[hash] = next;
1393 /* This entry is not in the proper hash bucket. This can happen
1395 for the hash bucket that it heads. This happens only very
1397 for (hash = 0; hash < HASH_SIZE; hash++)
1398 if (table[hash] == elt)
1399 table[hash] = next;
1424 remove_pseudo_from_table (rtx x, unsigned int hash)
1430 while ((elt = lookup_for_remove (x, hash, VOIDmode)))
1431 remove_from_table (elt, hash);
1434 /* Look up X in the hash table and return its table element,
1444 lookup (rtx x, unsigned int hash, machine_mode mode)
1448 for (p = table[hash]; p; p = p->next_same_hash)
1460 lookup_for_remove (rtx x, unsigned int hash, machine_mode mode)
1470 for (p = table[hash]; p; p = p->next_same_hash)
1477 for (p = table[hash]; p; p = p->next_same_hash)
1507 hash table, assuming HASH is its hash code and
1522 The in_memory field in the hash table element is set to 0.
1527 you must then recompute its hash code before calling here.
1532 insert_with_costs (rtx x, struct table_elt *classp, unsigned int hash,
1545 /* Put an element for X into the right hash bucket. */
1559 elt->next_same_hash = table[hash];
1566 if (table[hash])
1567 table[hash]->prev_same_hash = elt;
1568 table[hash] = elt;
1672 /* Get the integer-free subexpression in the hash table. */
1697 insert (rtx x, struct table_elt *classp, unsigned int hash,
1700 return insert_with_costs (x, classp, hash, mode,
1730 unsigned int hash;
1738 hash code (it also isn't necessary). */
1744 hash = HASH (exp, mode);
1753 remove_pseudo_from_table (exp, hash);
1755 remove_from_table (elt, hash);
1760 hash = HASH (exp, mode);
1762 new_elt = insert (exp, class1, hash, mode);
1771 /* Flush the entire hash table. */
1783 after P in the current hash chain. */
1808 /* Remove from the hash table, or mark as invalid, all expressions whose
1821 unsigned int hash = HASH (x, GET_MODE (x));
1825 entry from the hash table.
1837 remove_pseudo_from_table (x, hash);
1857 for (hash = 0; hash < HASH_SIZE; hash++)
1858 for (p = table[hash]; p; p = next)
1868 remove_from_table (p, hash);
1873 /* Remove from the hash table, or mark as invalid, all expressions whose
1919 /* Remove all hash table elements that refer to overlapping pieces of
1952 into the hash table for some reason, e.g. do_not_record
2016 /* Recompute the hash codes of any valid entries in the hash table that
2026 unsigned hash;
2039 /* Scan all hash chains looking for valid entries that mention X.
2040 If we find one and it is in the wrong hash chain, move it. */
2048 && i != (hash = SAFE_HASH (p->exp, p->mode)))
2058 p->next_same_hash = table[hash];
2060 if (table[hash])
2061 table[hash]->prev_same_hash = p;
2062 table[hash] = p;
2068 /* Remove from the hash table any expression that is a call-clobbered
2075 unsigned hash;
2109 for (hash = 0; hash < HASH_SIZE; hash++)
2110 for (p = table[hash]; p; p = next)
2122 remove_from_table (p, hash);
2129 is not in the hash table),
2202 /* Hash a string. Just add its bytes up. */
2206 unsigned hash = 0;
2211 hash += *p++;
2213 return hash;
2225 unsigned hash = 0;
2233 in HASH. */
2236 return hash;
2242 hash += hash_rtx_cb (newx, newmode, do_not_record_p,
2244 return hash;
2297 hash += ((unsigned int) REG << 7);
2298 hash += (have_reg_qty ? (unsigned) REG_QTY (regno) : regno);
2299 return hash;
2303 reg changes its hash value with every value change; we don't
2309 hash += (((unsigned int) SUBREG << 7)
2313 return hash;
2319 hash += (((unsigned int) CONST_INT << 7) + (unsigned int) mode
2321 return hash;
2325 hash += CONST_WIDE_INT_ELT (x, i);
2326 return hash;
2330 inchash::hash h;
2331 h.add_int (hash);
2340 hash += (unsigned int) code + (unsigned int) GET_MODE (x);
2342 hash += ((unsigned int) CONST_DOUBLE_LOW (x)
2345 hash += real_hash (CONST_DOUBLE_REAL_VALUE (x));
2346 return hash;
2349 hash += (unsigned int) code + (unsigned int) GET_MODE (x);
2350 hash += fixed_hash (CONST_FIXED_VALUE (x));
2351 return hash;
2363 hash += hash_rtx_cb (elt, GET_MODE (elt),
2368 return hash;
2373 /* We don't hash on the address of the CODE_LABEL to avoid bootstrap
2375 hash += (((unsigned int) LABEL_REF << 7)
2377 return hash;
2381 /* Don't hash on the symbol's address to avoid bootstrap differences.
2382 Different hash values may cause expressions to be recorded in
2392 hash += ((unsigned int) SYMBOL_REF << 7) + h;
2393 return hash;
2409 hash += (unsigned) MEM;
2422 hash += (unsigned) USE;
2430 hash += (unsigned) MEM;
2450 return hash;
2462 hash += (unsigned) code + (unsigned) GET_MODE (x)
2471 hash += (hash_rtx_cb (ASM_OPERANDS_INPUT (x, i),
2479 hash += hash_rtx_string (ASM_OPERANDS_INPUT_CONSTRAINT (x, 0));
2485 return hash;
2494 hash += (unsigned) code + (unsigned) GET_MODE (x);
2510 hash += hash_rtx_cb (XEXP (x, i), VOIDmode, do_not_record_p,
2517 hash += hash_rtx_cb (XVECEXP (x, i, j), VOIDmode, do_not_record_p,
2523 hash += hash_rtx_string (XSTR (x, i));
2527 hash += (unsigned int) XINT (x, i);
2531 hash += constant_lower_bound (SUBREG_BYTE (x));
2543 return hash;
2546 /* Hash an rtx. We are careful to make sure the value is never negative.
2547 Equivalent registers hash identically.
2556 Note that cse_insn knows that the hash code of a MEM expression
2557 is just (int) MEM plus the hash code of the address. */
2567 /* Hash an rtx X for cse via hash_rtx.
2593 and Y was found in the hash table. We check register refs
2900 operation (EQ, NE, GT, etc.), follow it back through the hash table and
2981 /* Look up ARG1 in the hash table and see if it has an equivalence
3829 the hash table in case its value was seen before. */
3991 /* Hash both operands. */
3995 op0_hash = HASH (op0, mode);
4003 op1_hash = HASH (op1, mode);
4042 /* Put OP0 in the hash table if it isn't already. This gives it a
4049 op0_hash = HASH (op0, mode);
4051 /* If OP0 is contained in OP1, this changes its hash code
4055 op1_hash = HASH (op1,mode);
4071 /* Put OP1 in the hash table so it gets a new quantity number. */
4077 op1_hash = HASH (op1, mode);
4104 op0_hash = HASH (op0, mode);
4116 op1_hash = HASH (op1, mode);
4153 /* The hash-table element for the SET_SRC of the SET. */
4155 /* Hash value for the SET_SRC. */
4157 /* Hash value for the SET_DEST. */
4170 /* Hash value of constant equivalent for SET_SRC. */
4627 Nothing in this loop changes the hash table or the register chains. */
4658 hash it with the destination's machine mode.
4671 src_eqv_hash = HASH (src_eqv, eqvmode);
4717 /* Compute SRC's hash code, and also notice if it
4736 sets[i].src_hash = HASH (src, mode);
4745 opportunities by not having SRC in the hash table. */
4815 src_eqv_hash = HASH (src_eqv, elt->mode);
4851 hash code and look it up. */
4854 sets[i].src_const_hash = HASH (src_const, mode);
4880 = lookup (src_related, HASH (src_related, mode), mode);
4913 = lookup (src_const, HASH (src_const, wider_mode), wider_mode);
4958 larger_elt = lookup (new_and, HASH (new_and, tmode), tmode);
5008 HASH (memory_extend_rtx, tmode), tmode);
5044 = lookup (src_elt, HASH (src_elt, const_mode), const_mode);
5118 possibilities. Prefer items not in the hash table to ones
5220 src_folded, src, src_eqv, src_related and hash table entry. */
5276 unsigned int dest_hash = HASH (dest_reg, GET_MODE (dest_reg));
5500 sets[i].src_hash = HASH (src, mode);
5559 /* Compute the hash code of the destination now,
5563 sets[i].dest_hash = HASH (dest, mode);
5565 /* Don't enter a bit-field in the hash table
5668 sets[i].dest_hash = HASH (SET_DEST (sets[i].rtl), mode);
5677 /* Now enter all non-volatile source expressions in the hash table
5700 src_eqv_hash = HASH (src_eqv, eqvmode);
5731 /* Insert source and constant equivalent into hash table, if not
5759 sets[i].src_hash = HASH (src, mode);
5779 /* If we did not insert the source into the hash table (e.g., it was
5784 /* Record destination addresses in the hash table. This allows us to
5793 unsigned hash;
5799 hash = HASH (x, mode);
5800 elt = lookup (x, hash, mode);
5808 hash = HASH (x, mode);
5809 sets[i].dest_hash = HASH (dest, GET_MODE (dest));
5811 elt = insert (x, NULL, hash, mode);
5876 This removes from the hash table
5880 we are going to hash the SET_DEST values unconditionally. */
5894 since that changes the hash code. However, that is not
5896 hash 'collision' of a register with its own invalid
5898 change their hash code with the hash code of the register,
5920 /* We may have just removed some of the src_elt's from the hash table.
5967 /* If we didn't put a REG_EQUAL value or a source into the hash
5982 /* If `insert_regs' changes something, the hash code must be
5985 sets[i].dest_hash = HASH (dest, GET_MODE (dest));
6066 src_hash = HASH (new_src, new_mode);
6069 /* Put the new source in the hash table is if isn't
6076 src_hash = HASH (new_src, new_mode);
6119 /* Remove from the hash table all expressions that reference memory. */
6563 /* If we have processed 1,000 insns, flush the hash table to