+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.
{
/* 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)
/* 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. */
if (GET_CODE (insn) == CALL_INSN)
{
- if (! CONST_CALL_P (insn))
+ if (! CONST_OR_PURE_CALL_P (insn))
invalidate_memory ();
invalidate_for_call ();
}
if (GET_CODE (insn) == CALL_INSN)
{
- if (! CONST_CALL_P (insn))
+ if (! CONST_OR_PURE_CALL_P (insn))
invalidate_memory ();
invalidate_for_call ();
}
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);
}
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 ();
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
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;
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);
mark_call (insn)
rtx insn;
{
- if (! CONST_CALL_P (insn))
+ if (! CONST_OR_PURE_CALL_P (insn))
record_last_mem_set_info (insn);
}
int i,j;
int ret = 0;
+ if (!x)
+ return 0;
+
if (GET_CODE (x) == SET)
x = SET_SRC (x);
if (GET_CODE (insn) == CALL_INSN)
{
- if (CONST_CALL_P (insn))
+ if (CONST_OR_PURE_CALL_P (insn))
return 0;
else
return 1;
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);
}
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. */
/* 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;
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);
/* 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
}
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;
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;
{
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])
/* 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)
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. */
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)