aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcse.c
diff options
context:
space:
mode:
authorZack Weinberg <zack@gcc.gnu.org>2001-08-10 16:19:22 +0000
committerZack Weinberg <zack@gcc.gnu.org>2001-08-10 16:19:22 +0000
commit19652adf824a8ea67dab582f1da76d23c77f4814 (patch)
tree71cd924b65b522f29baed4de47af5e11b3129192 /gcc/gcse.c
parent07fe2dec7ab1851349aca50c9935865af6e1f398 (diff)
downloadgcc-19652adf824a8ea67dab582f1da76d23c77f4814.zip
gcc-19652adf824a8ea67dab582f1da76d23c77f4814.tar.gz
gcc-19652adf824a8ea67dab582f1da76d23c77f4814.tar.bz2
calls.c, function.c: Always define PREFERRED_STACK_BOUNDARY if not already defined.
* calls.c, function.c: Always define PREFERRED_STACK_BOUNDARY if not already defined. Remove all #ifdefs on STACK_BOUNDARY; this macro is now required. * cselib.c (cselib_process_insn), flow.c (propagate_block), loop.c (find_and_verify_loops), reload.c (reload): Check for rtx code of CALL_INSN, not CALL, when deciding if we need to check for REG_SETJMP note. * gcse.c (compute_hash_table, compute_store_table): Update the #ifdef NON_SAVING_SETJMP code to the new REG_SETJMP logic. * config/avr/avr.c: Fix typo. * config/convex/convex.c (expand_movstr): Use adjust_address. * config/dsp16xx/dsp16xx.c: Define dsp16xx_compare_gen variable. * config/dsp16xx/dsp16xx.md: Correct calls to replace_equiv_address. * config/elxsi/elxsi.c: Include tree.h, expr.h, regs.h, and flags.h. Fix typo. * config/elxsi/elxsi.h: Don't define Rmode (typo for Pmode?) Do define STACK_BOUNDARY. * config/i370/i370.c: Include expr.h. * config/i860/sysv3.h, config/i860/sysv4.h, config/m32r/m32r.h, config/pa/som.h, config/v850/v850.h: Take in_ctors and in_dtors out of EXTRA_SECTIONS; take CTORS_SECTION_FUNCTION and DTORS_SECTION_FUNCTION out of EXTRA_SECTION_FUNCTIONS. * config/m88k/m88k.c: Include c-tree.h after expr.h. * config/pdp11/pdp11.c: Include expr.h and toplev.h. * config/romp/romp.c: Include expr.h after tree.h. Include toplev.h. (output_fpop): Use xmalloc, not oballoc. * config/we32k/we32k.c: Include expr.h. From-SVN: r44768
Diffstat (limited to 'gcc/gcse.c')
-rw-r--r--gcc/gcse.c43
1 files changed, 20 insertions, 23 deletions
diff --git a/gcc/gcse.c b/gcc/gcse.c
index f0031c0..230242e 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -2495,23 +2495,21 @@ compute_hash_table (set_p)
insn && insn != NEXT_INSN (BLOCK_END (bb));
insn = NEXT_INSN (insn))
{
-#ifdef NON_SAVING_SETJMP
- if (NON_SAVING_SETJMP && GET_CODE (insn) == NOTE
- && NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP)
- {
- for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
- record_last_reg_set_info (insn, regno);
- continue;
- }
-#endif
-
if (! INSN_P (insn))
continue;
if (GET_CODE (insn) == CALL_INSN)
{
+ bool clobbers_all = false;
+#ifdef NON_SAVING_SETJMP
+ if (NON_SAVING_SETJMP
+ && find_reg_note (insn, REG_SETJMP, NULL_RTX))
+ clobbers_all = true;
+#endif
+
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
- if (TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
+ if (clobbers_all
+ || TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
record_last_reg_set_info (insn, regno);
mark_call (insn);
@@ -6415,23 +6413,22 @@ compute_store_table ()
insn && insn != PREV_INSN (BLOCK_HEAD (bb));
insn = PREV_INSN (insn))
{
-#ifdef NON_SAVING_SETJMP
- if (NON_SAVING_SETJMP && GET_CODE (insn) == NOTE
- && NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP)
- {
- for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
- SET_BIT (reg_set_in_block[bb], regno);
- continue;
- }
-#endif
- /* Ignore anything that is not a normal insn. */
- if (GET_RTX_CLASS (GET_CODE (insn)) != 'i')
+ /* Ignore anything that is not a normal insn. */
+ if (! INSN_P (insn))
continue;
if (GET_CODE (insn) == CALL_INSN)
{
+ bool clobbers_all = false;
+#ifdef NON_SAVING_SETJMP
+ if (NON_SAVING_SETJMP
+ && find_reg_note (insn, REG_SETJMP, NULL_RTX))
+ clobbers_all = true;
+#endif
+
for (regno = 0; regno < FIRST_PSEUDO_REGISTER; regno++)
- if (TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
+ if (clobbers_all
+ || TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
SET_BIT (reg_set_in_block[bb], regno);
}