aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2001-08-07 14:59:58 +0200
committerJan Hubicka <hubicka@gcc.gnu.org>2001-08-07 12:59:58 +0000
commit24a285841212403389646af2198d1a34fd0b01e6 (patch)
tree0322c300793ed36c3e662d9a08be9ef6a9be7789 /gcc
parent0254ec9f02a56cba4779255813cf2a5d658838cd (diff)
downloadgcc-24a285841212403389646af2198d1a34fd0b01e6.zip
gcc-24a285841212403389646af2198d1a34fd0b01e6.tar.gz
gcc-24a285841212403389646af2198d1a34fd0b01e6.tar.bz2
alias.c (nonlocal_mentioned_p): Rename CONST_CALL_P to CONST_OR_PURE_CALL_P
* 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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog23
-rw-r--r--gcc/alias.c2
-rw-r--r--gcc/calls.c2
-rw-r--r--gcc/cse.c4
-rw-r--r--gcc/cselib.c2
-rw-r--r--gcc/df.c2
-rw-r--r--gcc/flow.c5
-rw-r--r--gcc/gcse.c10
-rw-r--r--gcc/haifa-sched.c2
-rw-r--r--gcc/integrate.c2
-rw-r--r--gcc/jump.c2
-rw-r--r--gcc/local-alloc.c2
-rw-r--r--gcc/loop.c4
-rw-r--r--gcc/predict.c2
-rw-r--r--gcc/reload1.c2
-rw-r--r--gcc/rtl.h4
-rw-r--r--gcc/sched-deps.c4
17 files changed, 50 insertions, 24 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 19e50ca..e3820fd 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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.
diff --git a/gcc/alias.c b/gcc/alias.c
index a529a01..e26e13c 100644
--- a/gcc/alias.c
+++ b/gcc/alias.c
@@ -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)
diff --git a/gcc/calls.c b/gcc/calls.c
index bb12b0a..e31900f 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -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. */
diff --git a/gcc/cse.c b/gcc/cse.c
index c7d1fcc..ade5b80 100644
--- 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 ();
}
diff --git a/gcc/cselib.c b/gcc/cselib.c
index e8e6beb..e6d5b2a 100644
--- a/gcc/cselib.c
+++ b/gcc/cselib.c
@@ -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);
}
diff --git a/gcc/df.c b/gcc/df.c
index 52fa362..776f4fe 100644
--- 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 ();
diff --git a/gcc/flow.c b/gcc/flow.c
index c01d56f..b2c9087 100644
--- a/gcc/flow.c
+++ b/gcc/flow.c
@@ -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;
diff --git a/gcc/gcse.c b/gcc/gcse.c
index 4fe1b3b..f0031c0 100644
--- a/gcc/gcse.c
+++ b/gcc/gcse.c
@@ -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;
diff --git a/gcc/haifa-sched.c b/gcc/haifa-sched.c
index 4974c22..c8fb5f7 100644
--- a/gcc/haifa-sched.c
+++ b/gcc/haifa-sched.c
@@ -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);
}
diff --git a/gcc/integrate.c b/gcc/integrate.c
index 83d3819..29c6809 100644
--- a/gcc/integrate.c
+++ b/gcc/integrate.c
@@ -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. */
diff --git a/gcc/jump.c b/gcc/jump.c
index dd099f2..9099c1f 100644
--- a/gcc/jump.c
+++ b/gcc/jump.c
@@ -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;
diff --git a/gcc/local-alloc.c b/gcc/local-alloc.c
index efc3159..8dd3174 100644
--- a/gcc/local-alloc.c
+++ b/gcc/local-alloc.c
@@ -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);
diff --git a/gcc/loop.c b/gcc/loop.c
index fbbef73..50b430d 100644
--- a/gcc/loop.c
+++ b/gcc/loop.c
@@ -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;
diff --git a/gcc/predict.c b/gcc/predict.c
index 36f59e0..91a64a3 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -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;
diff --git a/gcc/reload1.c b/gcc/reload1.c
index b2131de..86b6354 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -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])
diff --git a/gcc/rtl.h b/gcc/rtl.h
index 3a97da3..9e707da 100644
--- 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)
diff --git a/gcc/sched-deps.c b/gcc/sched-deps.c
index 3f4b129..69397a9 100644
--- a/gcc/sched-deps.c
+++ b/gcc/sched-deps.c
@@ -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)