Deleted Added
full compact
164c164
< return 0;
---
> return 0;
194c194
< IN_GROUP is non-zero if this is part of a group of changes that must be
---
> IN_GROUP is nonzero if this is part of a group of changes that must be
230,232c230,232
< changes =
< (change_t*) xrealloc (changes,
< sizeof (change_t) * changes_allocated);
---
> changes =
> (change_t*) xrealloc (changes,
> sizeof (change_t) * changes_allocated);
234c234
<
---
>
275c275
<
---
>
310a311,317
> /* Return number of changes made and not validated yet. */
> int
> num_changes_pending ()
> {
> return num_changes;
> }
>
365c372
< = gen_rtx_PARALLEL (VOIDmode,
---
> = gen_rtx_PARALLEL (VOIDmode,
394a402,409
> basic_block bb;
>
> for (i = 0; i < num_changes; i++)
> if (changes[i].object
> && INSN_P (changes[i].object)
> && (bb = BLOCK_FOR_INSN (changes[i].object)))
> bb->flags |= BB_DIRTY;
>
666,667c681
< SET_DESTs. After all changes have been made, validate by seeing if
< INSN is still valid. */
---
> SET_DESTs. */
669,670c683,684
< int
< validate_replace_src (from, to, insn)
---
> void
> validate_replace_src_group (from, to, insn)
678a693,701
> }
>
> /* Same as validate_repalace_src_group, but validate by seeing if
> INSN is still valid. */
> int
> validate_replace_src (from, to, insn)
> rtx from, to, insn;
> {
> validate_replace_src_group (from, to, insn);
781c804
<
---
>
836c859
< If PLOC is non-zero, *PLOC is set to the insn containing the single use.
---
> If PLOC is nonzero, *PLOC is set to the insn containing the single use.
933a957
> && mode != VOIDmode
965c989
< might be called from cleanup_subreg_operands.
---
> might be called from cleanup_subreg_operands.
970c994
< return 0;
---
> return 0;
973c997
< create such rtl, and we must reject it. */
---
> create such rtl, and we must reject it. */
1062c1086
< #ifdef CLASS_CANNOT_CHANGE_MODE
---
> #ifdef CANNOT_CHANGE_MODE_CLASS
1065,1068c1089
< && (TEST_HARD_REG_BIT
< (reg_class_contents[(int) CLASS_CANNOT_CHANGE_MODE],
< REGNO (sub)))
< && CLASS_CANNOT_CHANGE_MODE_P (mode, GET_MODE (sub))
---
> && REG_CANNOT_CHANGE_MODE_P (REGNO (sub), GET_MODE (sub), mode)
1138a1160
> && mode != VOIDmode
1220a1243
> && mode != VOIDmode
1337c1360
<
---
>
1591c1614
<
---
>
1643c1666
< /* Check if an asm_operand matches it's constraints.
---
> /* Check if an asm_operand matches it's constraints.
1711c1734
< || GET_CODE (XEXP (op, 0)) == POST_DEC))
---
> || GET_CODE (XEXP (op, 0)) == POST_DEC))
1719c1742
< || GET_CODE (XEXP (op, 0)) == POST_INC))
---
> || GET_CODE (XEXP (op, 0)) == POST_INC))
1724,1733d1746
< #ifndef REAL_ARITHMETIC
< /* Match any floating double constant, but only if
< we can examine the bits of it reliably. */
< if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
< || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
< && GET_MODE (op) != VOIDmode && ! flag_pretend_float)
< break;
< #endif
< /* FALLTHRU */
<
1735c1748,1750
< if (GET_CODE (op) == CONST_DOUBLE)
---
> if (GET_CODE (op) == CONST_DOUBLE
> || (GET_CODE (op) == CONST_VECTOR
> && GET_MODE_CLASS (GET_MODE (op)) == MODE_VECTOR_FLOAT))
1835a1851,1862
> if (EXTRA_MEMORY_CONSTRAINT (c))
> {
> /* Every memory operand can be reloaded to fit. */
> if (memory_operand (op, VOIDmode))
> return 1;
> }
> if (EXTRA_ADDRESS_CONSTRAINT (c))
> {
> /* Every address operand can be reloaded to fit. */
> if (address_operand (op, VOIDmode))
> return 1;
> }
2233c2260
< break;
---
> break;
2274a2302,2314
> if (EXTRA_MEMORY_CONSTRAINT (c))
> {
> op_alt[j].memory_ok = 1;
> break;
> }
> if (EXTRA_ADDRESS_CONSTRAINT (c))
> {
> op_alt[j].is_address = 1;
> op_alt[j].class = reg_class_subunion[(int) op_alt[j].class]
> [(int) MODE_BASE_REG_CLASS (VOIDmode)];
> break;
> }
>
2282c2322
<
---
>
2301c2341
< If STRICT is a positive non-zero value, it means that we have been
---
> If STRICT is a positive nonzero value, it means that we have been
2502,2513d2541
< #ifndef REAL_ARITHMETIC
< /* Match any CONST_DOUBLE, but only if
< we can examine the bits of it reliably. */
< if ((HOST_FLOAT_FORMAT != TARGET_FLOAT_FORMAT
< || HOST_BITS_PER_WIDE_INT != BITS_PER_WORD)
< && GET_MODE (op) != VOIDmode && ! flag_pretend_float)
< break;
< #endif
< if (GET_CODE (op) == CONST_DOUBLE)
< win = 1;
< break;
<
2515c2543,2545
< if (GET_CODE (op) == CONST_DOUBLE)
---
> if (GET_CODE (op) == CONST_DOUBLE
> || (GET_CODE (op) == CONST_VECTOR
> && GET_MODE_CLASS (GET_MODE (op)) == MODE_VECTOR_FLOAT))
2597a2628,2649
>
> if (EXTRA_MEMORY_CONSTRAINT (c))
> {
> /* Every memory operand can be reloaded to fit. */
> if (strict < 0 && GET_CODE (op) == MEM)
> win = 1;
>
> /* Before reload, accept what reload can turn into mem. */
> if (strict < 0 && CONSTANT_P (op))
> win = 1;
>
> /* During reload, accept a pseudo */
> if (reload_in_progress && GET_CODE (op) == REG
> && REGNO (op) >= FIRST_PSEUDO_REGISTER)
> win = 1;
> }
> if (EXTRA_ADDRESS_CONSTRAINT (c))
> {
> /* Every address operand can be reloaded to fit. */
> if (strict < 0)
> win = 1;
> }
2714,2718c2766
< {
< PUT_CODE (insn, NOTE);
< NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
< NOTE_SOURCE_FILE (insn) = 0;
< }
---
> delete_insn_and_edges (insn);
2734c2782
< reload splitters instead of computing the proper
---
> reload splitters instead of computing the proper
2760,2761c2808,2809
< int changed;
< int i;
---
> bool changed;
> basic_block bb;
2763c2811
< blocks = sbitmap_alloc (n_basic_blocks);
---
> blocks = sbitmap_alloc (last_basic_block);
2765c2813
< changed = 0;
---
> changed = false;
2767c2815
< for (i = n_basic_blocks - 1; i >= 0; --i)
---
> FOR_EACH_BB_REVERSE (bb)
2769d2816
< basic_block bb = BASIC_BLOCK (i);
2770a2818
> bool finish = false;
2772c2820
< for (insn = bb->head; insn ; insn = next)
---
> for (insn = bb->head; !finish ; insn = next)
2778a2827
> finish = (insn == bb->end);
2788,2789c2837,2838
< SET_BIT (blocks, i);
< changed = 1;
---
> SET_BIT (blocks, bb->index);
> changed = true;
2792,2794d2840
<
< if (insn == bb->end)
< break;
2796,2798d2841
<
< if (insn == NULL)
< abort ();
2802a2846,2847
> int old_last_basic_block = last_basic_block;
>
2803a2849,2851
>
> if (old_last_basic_block != last_basic_block && upd_life)
> blocks = sbitmap_resize (blocks, last_basic_block, 1);
2807,2810c2855,2857
< {
< count_or_remove_death_notes (blocks, 1);
< update_life_info (blocks, UPDATE_LIFE_LOCAL, PROP_DEATH_NOTES);
< }
---
> update_life_info (blocks, UPDATE_LIFE_GLOBAL_RM_NOTES,
> PROP_DEATH_NOTES | PROP_REG_INFO);
>
2818c2865
< /* Same as split_all_insns, but do not expect CFG to be available.
---
> /* Same as split_all_insns, but do not expect CFG to be available.
3037c3084,3085
< int i, b;
---
> int i;
> basic_block bb;
3051c3099
< blocks = sbitmap_alloc (n_basic_blocks);
---
> blocks = sbitmap_alloc (last_basic_block);
3058c3106
< for (b = n_basic_blocks - 1; b >= 0; --b)
---
> FOR_EACH_BB_REVERSE (bb)
3060d3107
< basic_block bb = BASIC_BLOCK (b);
3088a3136
> bool was_call = false;
3106c3154
< int j, k;
---
> int j;
3114a3163
> was_call = true;
3116,3129c3165,3173
< new_insn = NULL_RTX;
< if (GET_CODE (try) == SEQUENCE)
< for (k = XVECLEN (try, 0) - 1; k >= 0; k--)
< {
< rtx x = XVECEXP (try, 0, k);
< if (GET_CODE (x) == CALL_INSN)
< {
< new_insn = x;
< break;
< }
< }
< else if (GET_CODE (try) == CALL_INSN)
< new_insn = try;
< if (! new_insn)
---
> new_insn = try;
> while (new_insn != NULL_RTX)
> {
> if (GET_CODE (new_insn) == CALL_INSN)
> break;
> new_insn = NEXT_INSN (new_insn);
> }
>
> if (new_insn == NULL_RTX)
3169c3213
< note = find_reg_note (peep2_insn_data[i].insn,
---
> note = find_reg_note (peep2_insn_data[i].insn,
3173c3217,3218
< try = emit_insn_after (try, peep2_insn_data[i].insn);
---
> try = emit_insn_after_scope (try, peep2_insn_data[i].insn,
> INSN_SCOPE (peep2_insn_data[i].insn));
3178c3223
< if (note)
---
> if (note || (was_call && nonlocal_goto_handler_labels))
3184c3229
< if (eh_edge->flags & EDGE_EH)
---
> if (eh_edge->flags & (EDGE_EH | EDGE_ABNORMAL_CALL))
3193,3196c3238,3242
< REG_NOTES (x)
< = gen_rtx_EXPR_LIST (REG_EH_REGION,
< XEXP (note, 0),
< REG_NOTES (x));
---
> if (note)
> REG_NOTES (x)
> = gen_rtx_EXPR_LIST (REG_EH_REGION,
> XEXP (note, 0),
> REG_NOTES (x));
3204c3250,3251
< flags = EDGE_EH | EDGE_ABNORMAL;
---
> flags = (eh_edge->flags
> & (EDGE_EH | EDGE_ABNORMAL));
3235c3282
< SET_BIT (blocks, b);
---
> SET_BIT (blocks, bb->index);
3312a3360,3470
>
> /* Common predicates for use with define_bypass. */
>
> /* True if the dependency between OUT_INSN and IN_INSN is on the store
> data not the address operand(s) of the store. IN_INSN must be
> single_set. OUT_INSN must be either a single_set or a PARALLEL with
> SETs inside. */
>
> int
> store_data_bypass_p (out_insn, in_insn)
> rtx out_insn, in_insn;
> {
> rtx out_set, in_set;
>
> in_set = single_set (in_insn);
> if (! in_set)
> abort ();
>
> if (GET_CODE (SET_DEST (in_set)) != MEM)
> return false;
>
> out_set = single_set (out_insn);
> if (out_set)
> {
> if (reg_mentioned_p (SET_DEST (out_set), SET_DEST (in_set)))
> return false;
> }
> else
> {
> rtx out_pat;
> int i;
>
> out_pat = PATTERN (out_insn);
> if (GET_CODE (out_pat) != PARALLEL)
> abort ();
>
> for (i = 0; i < XVECLEN (out_pat, 0); i++)
> {
> rtx exp = XVECEXP (out_pat, 0, i);
>
> if (GET_CODE (exp) == CLOBBER)
> continue;
>
> if (GET_CODE (exp) != SET)
> abort ();
>
> if (reg_mentioned_p (SET_DEST (exp), SET_DEST (in_set)))
> return false;
> }
> }
>
> return true;
> }
>
> /* True if the dependency between OUT_INSN and IN_INSN is in the IF_THEN_ELSE
> condition, and not the THEN or ELSE branch. OUT_INSN may be either a single
> or multiple set; IN_INSN should be single_set for truth, but for convenience
> of insn categorization may be any JUMP or CALL insn. */
>
> int
> if_test_bypass_p (out_insn, in_insn)
> rtx out_insn, in_insn;
> {
> rtx out_set, in_set;
>
> in_set = single_set (in_insn);
> if (! in_set)
> {
> if (GET_CODE (in_insn) == JUMP_INSN || GET_CODE (in_insn) == CALL_INSN)
> return false;
> abort ();
> }
>
> if (GET_CODE (SET_SRC (in_set)) != IF_THEN_ELSE)
> return false;
> in_set = SET_SRC (in_set);
>
> out_set = single_set (out_insn);
> if (out_set)
> {
> if (reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 1))
> || reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 2)))
> return false;
> }
> else
> {
> rtx out_pat;
> int i;
>
> out_pat = PATTERN (out_insn);
> if (GET_CODE (out_pat) != PARALLEL)
> abort ();
>
> for (i = 0; i < XVECLEN (out_pat, 0); i++)
> {
> rtx exp = XVECEXP (out_pat, 0, i);
>
> if (GET_CODE (exp) == CLOBBER)
> continue;
>
> if (GET_CODE (exp) != SET)
> abort ();
>
> if (reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 1))
> || reg_mentioned_p (SET_DEST (out_set), XEXP (in_set, 2)))
> return false;
> }
> }
>
> return true;
> }