based on the condition code of the previous insn.
The HP-PA can conditionally nullify insns, providing a similar
- effect to the ARM, differing mostly in which insn is "in charge". */
+ effect to the ARM, differing mostly in which insn is "in charge". */
#include "config.h"
#include "system.h"
static int
insn_references_resource_p (insn, res, include_delayed_effects)
- register rtx insn;
- register struct resources *res;
+ rtx insn;
+ struct resources *res;
int include_delayed_effects;
{
struct resources insn_res;
static int
insn_sets_resource_p (insn, res, include_delayed_effects)
- register rtx insn;
- register struct resources *res;
+ rtx insn;
+ struct resources *res;
int include_delayed_effects;
{
struct resources insn_sets;
rtx list;
int length;
{
- register int i = 1;
- register rtx li;
+ int i = 1;
+ rtx li;
int had_barrier = 0;
/* Allocate the rtvec to hold the insns and the SEQUENCE. */
We will put the BARRIER back in later. */
if (NEXT_INSN (insn) && GET_CODE (NEXT_INSN (insn)) == BARRIER)
{
- delete_insn (NEXT_INSN (insn));
+ delete_related_insns (NEXT_INSN (insn));
last = get_last_insn ();
had_barrier = 1;
}
list, and rebuild the delay list if non-empty. */
prev = PREV_INSN (seq_insn);
trial = XVECEXP (seq, 0, 0);
- delete_insn (seq_insn);
+ delete_related_insns (seq_insn);
add_insn_after (trial, prev);
if (GET_CODE (trial) == JUMP_INSN
|| FIND_REG_INC_NOTE (trial, 0))
return;
if (PREV_INSN (NEXT_INSN (trial)) == trial)
- delete_insn (trial);
+ delete_related_insns (trial);
else
delete_from_delay_slot (trial);
}
}
#endif
- delete_insn (insn);
+ delete_related_insns (insn);
}
\f
/* Counters for delay-slot filling. */
static rtx
optimize_skip (insn)
- register rtx insn;
+ rtx insn;
{
- register rtx trial = next_nonnote_insn (insn);
+ rtx trial = next_nonnote_insn (insn);
rtx next_trial = next_active_insn (trial);
rtx delay_list = 0;
rtx target_label;
delay_list = add_to_delay_list (trial, NULL_RTX);
next_trial = next_active_insn (trial);
update_block (trial, trial);
- delete_insn (trial);
+ delete_related_insns (trial);
/* Also, if we are targeting an unconditional
branch, thread our jump to the target of that branch. Don't
if (trial == thread)
thread = next_active_insn (thread);
- delete_insn (trial);
+ delete_related_insns (trial);
INSN_FROM_TARGET_P (next_to_match) = 0;
}
else
else
{
update_block (XEXP (merged_insns, 0), thread);
- delete_insn (XEXP (merged_insns, 0));
+ delete_related_insns (XEXP (merged_insns, 0));
}
}
fill_simple_delay_slots (non_jumps_p)
int non_jumps_p;
{
- register rtx insn, pat, trial, next_trial;
- register int i;
+ rtx insn, pat, trial, next_trial;
+ int i;
int num_unfilled_slots = unfilled_slots_next - unfilled_slots_base;
struct resources needed, set;
int slots_to_fill, slots_filled;
tmp++;
/* Remove the unconditional jump from consideration for delay slot
- filling and unthread it. */
+ filling and unthread it. */
if (*tmp == trial)
*tmp = 0;
{
delay_list = gen_rtx_INSN_LIST (VOIDmode,
trial, delay_list);
update_block (trial, trial);
- delete_insn (trial);
+ delete_related_insns (trial);
if (slots_to_fill == ++slots_filled)
break;
continue;
break;
/* See if we have a resource problem before we try to
- split. */
+ split. */
if (GET_CODE (pat) != SEQUENCE
&& ! insn_references_resource_p (trial, &set, 1)
&& ! insn_sets_resource_p (trial, &set, 1)
link_cc0_insns (trial);
#endif
- delete_insn (trial);
+ delete_related_insns (trial);
if (slots_to_fill == ++slots_filled)
break;
continue;
current_function_epilogue_delay_list);
mark_end_of_function_resources (trial, 1);
update_block (trial, trial);
- delete_insn (trial);
+ delete_related_insns (trial);
/* Clear deleted bit so final.c will output the insn. */
INSN_DELETED_P (trial) = 0;
new_thread = thread;
}
- delete_insn (trial);
+ delete_related_insns (trial);
}
else
{
if (new_thread == trial)
new_thread = thread;
}
- delete_insn (trial);
+ delete_related_insns (trial);
}
else
new_thread = next_active_insn (trial);
if (recog_memoized (ninsn) < 0
|| (extract_insn (ninsn), ! constrain_operands (1)))
{
- delete_insn (ninsn);
+ delete_related_insns (ninsn);
return 0;
}
if (new_thread == trial)
new_thread = thread;
}
- delete_insn (trial);
+ delete_related_insns (trial);
}
else
new_thread = next_active_insn (trial);
static void
fill_eager_delay_slots ()
{
- register rtx insn;
- register int i;
+ rtx insn;
+ int i;
int num_unfilled_slots = unfilled_slots_next - unfilled_slots_base;
for (i = 0; i < num_unfilled_slots; i++)
relax_delay_slots (first)
rtx first;
{
- register rtx insn, next, pat;
- register rtx trial, delay_insn, target_label;
+ rtx insn, next, pat;
+ rtx trial, delay_insn, target_label;
/* Look at every JUMP_INSN and see if we can improve it. */
for (insn = first; insn; insn = next)
if (target_label != JUMP_LABEL (insn))
reorg_redirect_jump (insn, target_label);
- /* See if this jump branches around a unconditional jump.
+ /* See if this jump branches around an unconditional jump.
If so, invert this jump and point it to the target of the
second jump. */
if (next && GET_CODE (next) == JUMP_INSN
if (invert_jump (insn, label, 1))
{
- delete_insn (next);
+ delete_related_insns (next);
next = insn;
}
--LABEL_NUSES (label);
if (--LABEL_NUSES (target_label) == 0)
- delete_insn (target_label);
+ delete_related_insns (target_label);
continue;
}
INSN_FROM_TARGET_P (XVECEXP (pat, 0, i)) = 0;
trial = PREV_INSN (insn);
- delete_insn (insn);
+ delete_related_insns (insn);
emit_insn_after (pat, trial);
delete_scheduled_jump (delay_insn);
continue;
INSN_FROM_TARGET_P (XVECEXP (pat, 0, i)) = 0;
trial = PREV_INSN (insn);
- delete_insn (insn);
+ delete_related_insns (insn);
emit_insn_after (pat, trial);
delete_scheduled_jump (delay_insn);
continue;
&& XVECLEN (pat, 0) == 2
&& rtx_equal_p (PATTERN (next), PATTERN (XVECEXP (pat, 0, 1))))
{
- delete_insn (insn);
+ delete_related_insns (insn);
continue;
}
INSN_FROM_TARGET_P (slot) = ! INSN_FROM_TARGET_P (slot);
}
- delete_insn (next);
+ delete_related_insns (next);
next = insn;
}
if (old_label && --LABEL_NUSES (old_label) == 0)
- delete_insn (old_label);
+ delete_related_insns (old_label);
continue;
}
}
{
rtx prev = PREV_INSN (insn);
- delete_insn (insn);
+ delete_related_insns (insn);
for (i = 1; i < XVECLEN (pat, 0); i++)
prev = emit_insn_after (PATTERN (XVECEXP (pat, 0, i)), prev);
/* Now delete REAL_RETURN_LABEL if we never used it. Then try to fill any
new delay slots we have created. */
if (--LABEL_NUSES (real_return_label) == 0)
- delete_insn (real_return_label);
+ delete_related_insns (real_return_label);
fill_simple_delay_slots (1);
fill_simple_delay_slots (0);
if (GET_CODE (insn) == INSN && GET_CODE (PATTERN (insn)) == USE
&& INSN_P (XEXP (PATTERN (insn), 0)))
- next = delete_insn (insn);
+ next = delete_related_insns (insn);
}
/* If we made an end of function label, indicate that it is now
safe to delete it by undoing our prior adjustment to LABEL_NUSES.
If it is now unused, delete it. */
if (end_of_function_label && --LABEL_NUSES (end_of_function_label) == 0)
- delete_insn (end_of_function_label);
+ delete_related_insns (end_of_function_label);
#ifdef HAVE_return
if (HAVE_return && end_of_function_label != 0)
if (file)
{
- register int i, j, need_comma;
+ int i, j, need_comma;
int total_delay_slots[MAX_DELAY_HISTOGRAM + 1];
int total_annul_slots[MAX_DELAY_HISTOGRAM + 1];