builtins.c (purge_builtin_constant_p): Scan insn stream sequentially rather than by basic block.
* builtins.c (purge_builtin_constant_p): Scan insn stream sequentially rather than by basic block. * function.c (purge_addressof): Simplify test with INSN_P. From-SVN: r61789
This commit is contained in:
parent
ad487c3816
commit
2adc9b0fc5
3 changed files with 20 additions and 21 deletions
|
@ -1,3 +1,9 @@
|
|||
2002-01-25 Roger Sayle <roger@eyesopen.com>
|
||||
|
||||
* builtins.c (purge_builtin_constant_p): Scan insn stream
|
||||
sequentially rather than by basic block.
|
||||
* function.c (purge_addressof): Simplify test with INSN_P.
|
||||
|
||||
2003-01-25 Kazu Hirata <kazu@cs.umass.edu>
|
||||
|
||||
* combine.c (simplify_comparison, case AND): Remove a redundant
|
||||
|
|
|
@ -4720,26 +4720,20 @@ default_expand_builtin (exp, target, subtarget, mode, ignore)
|
|||
void
|
||||
purge_builtin_constant_p ()
|
||||
{
|
||||
rtx insn, done, set;
|
||||
rtx arg, new, note;
|
||||
basic_block bb;
|
||||
rtx insn, set, arg, new, note;
|
||||
|
||||
FOR_EACH_BB (bb)
|
||||
{
|
||||
done = NEXT_INSN (bb->end);
|
||||
for (insn = bb->head; insn != done; insn = NEXT_INSN (insn))
|
||||
if (INSN_P (insn)
|
||||
&& (set = single_set (insn)) != NULL_RTX
|
||||
&& GET_CODE (SET_SRC (set)) == CONSTANT_P_RTX)
|
||||
{
|
||||
arg = XEXP (SET_SRC (set), 0);
|
||||
new = CONSTANT_P (arg) ? const1_rtx : const0_rtx;
|
||||
validate_change (insn, &SET_SRC (set), new, 0);
|
||||
for (insn = get_insns (); insn; insn = NEXT_INSN (insn))
|
||||
if (INSN_P (insn)
|
||||
&& (set = single_set (insn)) != NULL_RTX
|
||||
&& GET_CODE (SET_SRC (set)) == CONSTANT_P_RTX)
|
||||
{
|
||||
arg = XEXP (SET_SRC (set), 0);
|
||||
new = CONSTANT_P (arg) ? const1_rtx : const0_rtx;
|
||||
validate_change (insn, &SET_SRC (set), new, 0);
|
||||
|
||||
/* Remove the REG_EQUAL note from the insn. */
|
||||
if ((note = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0)
|
||||
remove_note (insn, note);
|
||||
}
|
||||
}
|
||||
/* Remove the REG_EQUAL note from the insn. */
|
||||
if ((note = find_reg_note (insn, REG_EQUAL, NULL_RTX)) != 0)
|
||||
remove_note (insn, note);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -3372,8 +3372,7 @@ purge_addressof (insns)
|
|||
compute_insns_for_mem (insns, NULL_RTX, ht);
|
||||
|
||||
for (insn = insns; insn; insn = NEXT_INSN (insn))
|
||||
if (GET_CODE (insn) == INSN || GET_CODE (insn) == JUMP_INSN
|
||||
|| GET_CODE (insn) == CALL_INSN)
|
||||
if (INSN_P (insn))
|
||||
{
|
||||
if (! purge_addressof_1 (&PATTERN (insn), insn,
|
||||
asm_noperands (PATTERN (insn)) > 0, 0, ht))
|
||||
|
|
Loading…
Add table
Reference in a new issue