diff options
author | Roger Sayle <roger@eyesopen.com> | 2003-01-25 17:47:26 +0000 |
---|---|---|
committer | Roger Sayle <sayle@gcc.gnu.org> | 2003-01-25 17:47:26 +0000 |
commit | 2adc9b0fc586bbe4f97f6571b75ce570d6fb7bcb (patch) | |
tree | ca6423303b1850aca0173bd4cd22a7d940b9b92e /gcc/builtins.c | |
parent | ad487c38165975bc7980d362b3a664808deae35c (diff) | |
download | gcc-2adc9b0fc586bbe4f97f6571b75ce570d6fb7bcb.zip gcc-2adc9b0fc586bbe4f97f6571b75ce570d6fb7bcb.tar.gz gcc-2adc9b0fc586bbe4f97f6571b75ce570d6fb7bcb.tar.bz2 |
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
Diffstat (limited to 'gcc/builtins.c')
-rw-r--r-- | gcc/builtins.c | 32 |
1 files changed, 13 insertions, 19 deletions
diff --git a/gcc/builtins.c b/gcc/builtins.c index 95f9494..d7d8054 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -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); + } } |