expr_equiv_p (x, y)
rtx x, y;
{
- register int i, j;
- register enum rtx_code code;
- register const char *fmt;
+ int i, j;
+ enum rtx_code code;
+ const char *fmt;
if (x == y)
return 1;
if (INSN_P (insn))
{
if (find_reg_note (insn, REG_LIBCALL, NULL_RTX))
- in_libcall_block = 1;
- else if (find_reg_note (insn, REG_RETVAL, NULL_RTX))
- in_libcall_block = 0;
- hash_scan_insn (insn, set_p, in_libcall_block);
+ in_libcall_block = 1;
+ else if (set_p && find_reg_note (insn, REG_RETVAL, NULL_RTX))
+ in_libcall_block = 0;
+ hash_scan_insn (insn, set_p, in_libcall_block);
+ if (!set_p && find_reg_note (insn, REG_RETVAL, NULL_RTX))
+ in_libcall_block = 0;
}
}
Look at the linked list starting at reg_set_table[regx]
For each setting of regx in the linked list, which is not in
this block
- Set the bit in `kill' corresponding to that insn. */
+ Set the bit in `kill' corresponding to that insn. */
for (bb = 0; bb < n_basic_blocks; bb++)
for (cuid = 0; cuid < max_cuid; cuid++)
if (TEST_BIT (rd_gen[bb], cuid))
SET_DEST (expr_set)),
insn_computes_expr);
- /* Keep block number table up to date. */
- set_block_for_new_insns (new_insn, BLOCK_FOR_INSN (insn_computes_expr));
-
/* Keep register set table up to date. */
record_one_set (REGNO (to), new_insn);
return 0;
/* If we succeeded, delete the cc0 setter. */
- PUT_CODE (insn, NOTE);
- NOTE_LINE_NUMBER (insn) = NOTE_INSN_DELETED;
- NOTE_SOURCE_FILE (insn) = 0;
+ delete_insn (insn);
return 1;
}
}
#endif
/* FIXME: What if something in cc0/jump uses value set in new insn? */
- new_insn = emit_block_insn_before (pat, insn, bb);
+ new_insn = emit_insn_before (pat, insn);
}
/* Likewise if the last insn is a call, as will happen in the presence
|| NOTE_INSN_BASIC_BLOCK_P (insn))
insn = NEXT_INSN (insn);
- new_insn = emit_block_insn_before (pat, insn, bb);
+ new_insn = emit_insn_before (pat, insn);
}
else
- {
- new_insn = emit_insn_after (pat, insn);
- bb->end = new_insn;
- }
+ new_insn = emit_insn_after (pat, insn);
/* Keep block number table up to date.
Note, PAT could be a multiple insn sequence, we have to make
for (i = 0; i < XVECLEN (pat, 0); i++)
{
rtx insn = XVECEXP (pat, 0, i);
-
- set_block_for_insn (insn, bb);
if (INSN_P (insn))
add_label_notes (PATTERN (insn), new_insn);
else
{
add_label_notes (SET_SRC (pat), new_insn);
- set_block_for_new_insns (new_insn, bb);
/* Keep register set table up to date. */
record_one_set (regno, new_insn);
int indx = expr->bitmap_index;
rtx set = single_set (insn);
rtx new_insn;
- basic_block bb = BLOCK_FOR_INSN (insn);
if (!set)
abort ();
new_insn = emit_insn_after (gen_move_insn (reg, SET_DEST (set)), insn);
- /* Keep block number table up to date. */
- set_block_for_new_insns (new_insn, bb);
-
/* Keep register set table up to date. */
record_one_set (regno, new_insn);
- if (insn == bb->end)
- bb->end = new_insn;
gcse_create_count++;
However, on the x86 some of the movXX patterns actually
contain clobbers of scratch regs. This may cause the
insn created by validate_change to not match any pattern
- and thus cause validate_change to fail. */
+ and thus cause validate_change to fail. */
if (validate_change (insn, &SET_SRC (set),
expr->reaching_reg, 0))
{
We no longer ignore such label references (see LABEL_REF handling in
mark_jump_label for additional information). */
- REG_NOTES (insn) = gen_rtx_EXPR_LIST (REG_LABEL, XEXP (x, 0),
+ REG_NOTES (insn) = gen_rtx_INSN_LIST (REG_LABEL, XEXP (x, 0),
REG_NOTES (insn));
if (LABEL_P (XEXP (x, 0)))
LABEL_NUSES (XEXP (x, 0))++;
/* LAST_INSN is a conditional jump. Get its condition. */
condition = get_condition (last_insn, &earliest);
- /* If we were unable to get the condition, or it is not a equality
+ /* If we were unable to get the condition, or it is not an equality
comparison against zero then there's nothing we can do. */
if (!condition
|| (GET_CODE (condition) != NE && GET_CODE (condition) != EQ)
if (delete_list)
{
for (i = 0; i < VARRAY_ACTIVE_SIZE (delete_list); i++)
- delete_insn (VARRAY_RTX (delete_list, i));
+ delete_related_insns (VARRAY_RTX (delete_list, i));
VARRAY_FREE (delete_list);
}
copy = gen_move_insn ( reg, SET_SRC (pat));
new = emit_insn_before (copy, insn);
record_one_set (REGNO (reg), new);
- set_block_for_new_insns (new, BLOCK_FOR_INSN (insn));
SET_SRC (pat) = reg;
/* un-recognize this pattern since it's probably different now. */
insn = emit_insn_after (insn, prev);
- if (prev == bb->end)
- bb->end = insn;
-
- set_block_for_new_insns (insn, bb);
-
if (gcse_file)
{
fprintf (gcse_file, "STORE_MOTION insert store at start of BB %d:\n",
insn = gen_move_insn (reg, SET_SRC (PATTERN (del)));
insn = emit_insn_after (insn, del);
- set_block_for_new_insns (insn, bb);
if (gcse_file)
{
fprintf(gcse_file, "\n");
}
- if (bb->end == del)
- bb->end = insn;
-
- if (bb->head == del)
- bb->head = insn;
-
delete_insn (del);
}