]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
alias.c (nonlocal_mentioned_p): Rename CONST_CALL_P to CONST_OR_PURE_CALL_P
authorJan Hubicka <jh@suse.cz>
Tue, 7 Aug 2001 12:59:58 +0000 (14:59 +0200)
committerJan Hubicka <hubicka@gcc.gnu.org>
Tue, 7 Aug 2001 12:59:58 +0000 (12:59 +0000)
* alias.c (nonlocal_mentioned_p):
Rename CONST_CALL_P to CONST_OR_PURE_CALL_P
* calls.c (emit_call_1): Likewise.
* cse.c (cse_insn, invalidate_skipped_block): Likewise.
* cselib.c (cselib_process_insn): Likewise.
* df.c (df_insns_modify): Likewise.
* flow.c (need_fake_edge_p): Likewise.
(propagate_one_insn): Likewise.
* haifa-sched.c (reemit_notes): Likewise.
* integrate.c (copy_insn_list): Likewise.
* jump.c (delete_prior_computation): Likewise.
* local-alloc.c (validate_equiv_mem): Likewise.
* loop.c (scan_loop): Likewise.
* predict.c (estimate_probability): Likewise.
* reload.c (reload): Likewise.
* sched-deps (sched_analyze): Likewise.
* rtl.h (CONST_CALL_P): rename to CONST_OR_PURE_CALL_P.
* gcse.c (compute_hash_table): Likewise.
(mark_call): Likewise.
(store_killed_in_insn): Likewise.

From-SVN: r44688

17 files changed:
gcc/ChangeLog
gcc/alias.c
gcc/calls.c
gcc/cse.c
gcc/cselib.c
gcc/df.c
gcc/flow.c
gcc/gcse.c
gcc/haifa-sched.c
gcc/integrate.c
gcc/jump.c
gcc/local-alloc.c
gcc/loop.c
gcc/predict.c
gcc/reload1.c
gcc/rtl.h
gcc/sched-deps.c

index 19e50caf64c73b6a309d3821365a8b111d4e7b8a..e3820fd857940fa7ce46876a8de6c7d47a2f519e 100644 (file)
@@ -1,3 +1,26 @@
+Tue Aug  7 14:56:16 CEST 2001  Jan Hubicka  <jh@suse.cz>
+
+       * alias.c (nonlocal_mentioned_p):
+       Rename CONST_CALL_P to CONST_OR_PURE_CALL_P
+       * calls.c (emit_call_1): Likewise.
+       * cse.c (cse_insn, invalidate_skipped_block): Likewise.
+       * cselib.c (cselib_process_insn): Likewise.
+       * df.c (df_insns_modify): Likewise.
+       * flow.c (need_fake_edge_p): Likewise.
+       (propagate_one_insn): Likewise.
+       * haifa-sched.c (reemit_notes): Likewise.
+       * integrate.c (copy_insn_list): Likewise.
+       * jump.c (delete_prior_computation): Likewise.
+       * local-alloc.c (validate_equiv_mem): Likewise.
+       * loop.c (scan_loop): Likewise.
+       * predict.c (estimate_probability): Likewise.
+       * reload.c (reload): Likewise.
+       * sched-deps (sched_analyze): Likewise.
+       * rtl.h (CONST_CALL_P): rename to CONST_OR_PURE_CALL_P.
+       * gcse.c (compute_hash_table): Likewise.
+       (mark_call): Likewise.
+       (store_killed_in_insn): Likewise.
+
 2001-08-07  Jason Merrill  <jason_merrill@redhat.com>
 
        * c-semantics.c (make_rtl_for_local_static): Use DECL_RTL_SET_P.
index a529a01cfa6b15f0ee2128d61d2098d2fa1f5b85..e26e13c2c97cf910e4f97011c5668609d4437743 100644 (file)
@@ -1941,7 +1941,7 @@ nonlocal_mentioned_p (x)
     {
       /* Constant functions can be constant if they don't use
          scratch memory used to mark function w/o side effects.  */
-      if (code == CALL_INSN && CONST_CALL_P (x))
+      if (code == CALL_INSN && CONST_OR_PURE_CALL_P (x))
         {
          x = CALL_INSN_FUNCTION_USAGE (x);
          if (x == 0)
index bb12b0a17126b3b126bc1defd618f3ee4d3f6890..e31900f33ae5303e632241a036081e490bc57c96 100644 (file)
@@ -598,7 +598,7 @@ emit_call_1 (funexp, fndecl, funtype, stack_size, rounded_stack_size,
 
   /* If this is a const call, then set the insn's unchanging bit.  */
   if (ecf_flags & (ECF_CONST | ECF_PURE))
-    CONST_CALL_P (call_insn) = 1;
+    CONST_OR_PURE_CALL_P (call_insn) = 1;
 
   /* If this call can't throw, attach a REG_EH_REGION reg note to that
      effect.  */
index c7d1fccdaa12cc6ff4924c6513b5add165bb3e46..ade5b802c77e673e682fac2e60ecf88dc8505e6b 100644 (file)
--- a/gcc/cse.c
+++ b/gcc/cse.c
@@ -5956,7 +5956,7 @@ cse_insn (insn, libcall_insn)
 
   if (GET_CODE (insn) == CALL_INSN)
     {
-      if (! CONST_CALL_P (insn))
+      if (! CONST_OR_PURE_CALL_P (insn))
        invalidate_memory ();
       invalidate_for_call ();
     }
@@ -6636,7 +6636,7 @@ invalidate_skipped_block (start)
 
       if (GET_CODE (insn) == CALL_INSN)
        {
-         if (! CONST_CALL_P (insn))
+         if (! CONST_OR_PURE_CALL_P (insn))
            invalidate_memory ();
          invalidate_for_call ();
        }
index e8e6beb5bd296d477d930c1d236ae0b47c3f40da..e6d5b2ae50f1038cc1abb26a6c7cb82cf48e3382 100644 (file)
@@ -1279,7 +1279,7 @@ cselib_process_insn (insn)
        if (call_used_regs[i])
          cselib_invalidate_regno (i, VOIDmode);
 
-      if (! CONST_CALL_P (insn))
+      if (! CONST_OR_PURE_CALL_P (insn))
        cselib_invalidate_mem (callmem);
     }
 
index 52fa3629e5572e40e130b87dc26e4735d4372b0d..776f4feebc89e4b00a5f88c33987ea9babc895d0 100644 (file)
--- a/gcc/df.c
+++ b/gcc/df.c
@@ -2882,7 +2882,7 @@ df_insns_modify (df, bb, first_insn, last_insn)
         it does, we need to create a new basic block.  Ouch.  The
         same applies for a label.  */
       if ((GET_CODE (insn) == CALL_INSN
-          && ! CONST_CALL_P (insn))
+          && ! CONST_OR_PURE_CALL_P (insn))
          || GET_CODE (insn) == CODE_LABEL)
        abort ();
 
index c01d56ff47fffe815f118d95a2e19083d6b122a5..b2c90877e233a41c63db0b7238fe10ef9664dfa6 100644 (file)
@@ -2512,7 +2512,8 @@ need_fake_edge_p (insn)
 
   if ((GET_CODE (insn) == CALL_INSN
        && !SIBLING_CALL_P (insn)
-       && !find_reg_note (insn, REG_NORETURN, NULL) && !CONST_CALL_P (insn)))
+       && !find_reg_note (insn, REG_NORETURN, NULL)
+       && !CONST_OR_PURE_CALL_P (insn)))
     return true;
 
   return ((GET_CODE (PATTERN (insn)) == ASM_OPERANDS
@@ -5392,7 +5393,7 @@ propagate_one_insn (pbi, insn)
            cond = COND_EXEC_TEST (PATTERN (insn));
 
          /* Non-constant calls clobber memory.  */
-         if (! CONST_CALL_P (insn))
+         if (! CONST_OR_PURE_CALL_P (insn))
            {
              free_EXPR_LIST_list (&pbi->mem_set_list);
              pbi->mem_set_list_len = 0;
index 4fe1b3be60159861fa8b219c5d3da7df9b38c597..f0031c093fe95fbc58230a89c510b1913e8ef699 100644 (file)
@@ -2514,8 +2514,7 @@ compute_hash_table (set_p)
                if (TEST_HARD_REG_BIT (regs_invalidated_by_call, regno))
                  record_last_reg_set_info (insn, regno);
 
-             if (! CONST_CALL_P (insn))
-               record_last_mem_set_info (insn);
+             mark_call (insn);
            }
 
          note_stores (PATTERN (insn), record_last_set_info, insn);
@@ -2794,7 +2793,7 @@ static void
 mark_call (insn)
      rtx insn;
 {
-  if (! CONST_CALL_P (insn))
+  if (! CONST_OR_PURE_CALL_P (insn))
     record_last_mem_set_info (insn);
 }
 
@@ -6478,6 +6477,9 @@ find_loads (x, store_pattern)
   int i,j;
   int ret = 0;
 
+  if (!x)
+    return 0;
+
   if (GET_CODE (x) == SET) 
     x = SET_SRC (x);
 
@@ -6513,7 +6515,7 @@ store_killed_in_insn (x, insn)
   
   if (GET_CODE (insn) == CALL_INSN)
     {
-      if (CONST_CALL_P (insn))
+      if (CONST_OR_PURE_CALL_P (insn))
        return 0;
       else
        return 1;
index 4974c22f686b0a5ff3d7577626ab890c8fa6705b..c8fb5f767d6e019d20ebfa57491c5489f7c0bc97 100644 (file)
@@ -1561,7 +1561,7 @@ reemit_notes (insn, last)
          if (note_type == NOTE_INSN_SETJMP)
            {
              retval = emit_note_after (NOTE_INSN_SETJMP, insn);
-             CONST_CALL_P (retval) = CONST_CALL_P (note);
+             CONST_OR_PURE_CALL_P (retval) = CONST_OR_PURE_CALL_P (note);
              remove_note (insn, note);
              note = XEXP (note, 1);
            }
index 83d3819b832dab3752bd8f5421efcf4ff91afa42..29c68094140966623922f3389d48c52a65cd3e53 100644 (file)
@@ -1522,7 +1522,7 @@ copy_insn_list (insns, map, static_chain_value)
          copy = emit_call_insn (pattern);
 
          SIBLING_CALL_P (copy) = SIBLING_CALL_P (insn);
-         CONST_CALL_P (copy) = CONST_CALL_P (insn);
+         CONST_OR_PURE_CALL_P (copy) = CONST_OR_PURE_CALL_P (insn);
 
          /* Because the USAGE information potentially contains objects other
             than hard registers, we need to copy it.  */
index dd099f2a84098633325b536905cb78e898a86cd5..9099c1f5c3a5c3ea6e6f442024cdc0931cfd8f00 100644 (file)
@@ -1521,7 +1521,7 @@ delete_prior_computation (note, insn)
       /* If we reach a CALL which is not calling a const function
         or the callee pops the arguments, then give up.  */
       if (GET_CODE (our_prev) == CALL_INSN
-         && (! CONST_CALL_P (our_prev)
+         && (! CONST_OR_PURE_CALL_P (our_prev)
              || GET_CODE (pat) != SET || GET_CODE (SET_SRC (pat)) != CALL))
        break;
 
index efc31597908ec1acf9a435e0f64e175c8413e6ae..8dd3174c83d3869062d6b10dd4b1b3d0f25cd5c3 100644 (file)
@@ -499,7 +499,7 @@ validate_equiv_mem (start, reg, memref)
        return 1;
 
       if (GET_CODE (insn) == CALL_INSN && ! RTX_UNCHANGING_P (memref)
-         && ! CONST_CALL_P (insn))
+         && ! CONST_OR_PURE_CALL_P (insn))
        return 0;
 
       note_stores (PATTERN (insn), validate_equiv_mem_from_store, NULL);
index fbbef734b7c70934e6a9d5d4c8327fbea4410ca9..50b430d7cd876a33f26f92f5d5856a0edca2baf5 100644 (file)
@@ -950,7 +950,7 @@ scan_loop (loop, flags)
       /* Past a call insn, we get to insns which might not be executed
         because the call might exit.  This matters for insns that trap.
         Constant and pure call insns always return, so they don't count.  */
-      else if (GET_CODE (p) == CALL_INSN && ! CONST_CALL_P (p))
+      else if (GET_CODE (p) == CALL_INSN && ! CONST_OR_PURE_CALL_P (p))
        call_passed = 1;
       /* Past a label or a jump, we get to insns for which we
         can't count on whether or how many times they will be
@@ -2364,7 +2364,7 @@ prescan_loop (loop)
        }
       else if (GET_CODE (insn) == CALL_INSN)
        {
-         if (! CONST_CALL_P (insn))
+         if (! CONST_OR_PURE_CALL_P (insn))
            {
              loop_info->unknown_address_altered = 1;
              loop_info->has_nonconst_call = 1;
index 36f59e0c0ae21380c1409f8414dd3aef8a8aa562..91a64a3fd1f9a1d7a3de8f901bdb9ddd60d80add 100644 (file)
@@ -386,7 +386,7 @@ estimate_probability (loops_info)
                if (GET_CODE (insn) == CALL_INSN
                    /* Constant and pure calls are hardly used to signalize
                       something exceptional.  */
-                   && ! CONST_CALL_P (insn))
+                   && ! CONST_OR_PURE_CALL_P (insn))
                  {
                    predict_edge_def (e, PRED_CALL, NOT_TAKEN);
                    break;
index b2131de22e03af4127a4f47369f084dabb8aa208..86b635429b96a8bddb7f61148acd32fdc0fb5951 100644 (file)
@@ -762,7 +762,7 @@ reload (first, global)
     {
       rtx set = single_set (insn);
 
-      if (GET_CODE (insn) == NOTE && CONST_CALL_P (insn)
+      if (GET_CODE (insn) == NOTE && CONST_OR_PURE_CALL_P (insn)
          && NOTE_LINE_NUMBER (insn) == NOTE_INSN_SETJMP)
        for (i = 0; i < FIRST_PSEUDO_REGISTER; i++)
          if (! call_used_regs[i])
index 3a97da305457edcd56dd09a2477776eb3c361b42..9e707dade0c6a36fb4012c8ac180d3ade5d6bcac 100644 (file)
--- a/gcc/rtl.h
+++ b/gcc/rtl.h
@@ -393,8 +393,8 @@ extern void rtvec_check_failed_bounds PARAMS ((rtvec, int,
 /* 1 if insn has been deleted.  */
 #define INSN_DELETED_P(INSN) ((INSN)->volatil)
 
-/* 1 if insn is a call to a const function.  */
-#define CONST_CALL_P(INSN) ((INSN)->unchanging)
+/* 1 if insn is a call to a const or pure function.  */
+#define CONST_OR_PURE_CALL_P(INSN) ((INSN)->unchanging)
 
 /* 1 if insn (assumed to be a CALL_INSN) is a sibling call.  */
 #define SIBLING_CALL_P(INSN) ((INSN)->jump)
index 3f4b1290d7c9a490084a83539047738d4556e2d8..69397a9542c0ec740f7e556b0172356cf5664352 100644 (file)
@@ -1343,7 +1343,7 @@ sched_analyze (deps, head, tail)
             all pending reads and writes, and start new dependencies starting
             from here.  But only flush writes for constant calls (which may
             be passed a pointer to something we haven't written yet).  */
-         flush_pending_lists (deps, insn, CONST_CALL_P (insn));
+         flush_pending_lists (deps, insn, CONST_OR_PURE_CALL_P (insn));
 
          /* Depend this function call (actually, the user of this
             function call) on all hard register clobberage.  */
@@ -1393,7 +1393,7 @@ sched_analyze (deps, head, tail)
          loop_notes = alloc_EXPR_LIST (REG_SAVE_NOTE,
                                        GEN_INT (NOTE_LINE_NUMBER (insn)),
                                        loop_notes);
-         CONST_CALL_P (loop_notes) = CONST_CALL_P (insn);
+         CONST_OR_PURE_CALL_P (loop_notes) = CONST_OR_PURE_CALL_P (insn);
        }
 
       if (insn == tail)