From 6b67ec08ceed9e120a93fe1fea50d77dc8969eac Mon Sep 17 00:00:00 2001 From: Richard Kenner Date: Fri, 6 May 1994 17:48:55 -0400 Subject: [PATCH] (flow_analysis, find_basic_blocks): Change from USE and CLOBBER insns to using CALL_INSN_FUNCTION_USAGE. From-SVN: r7242 --- gcc/flow.c | 34 +++++++++++++--------------------- 1 file changed, 13 insertions(+), 21 deletions(-) diff --git a/gcc/flow.c b/gcc/flow.c index 825ecb197367..71d15ad7014f 100644 --- a/gcc/flow.c +++ b/gcc/flow.c @@ -347,17 +347,10 @@ flow_analysis (f, nregs, file) || (GET_RTX_CLASS (code) == 'i' && (prev_code == JUMP_INSN || (prev_code == CALL_INSN - && nonlocal_label_list != 0 - /* Ignore a CLOBBER after a CALL_INSN here. */ - && ! (code == INSN - && GET_CODE (PATTERN (insn)) == CLOBBER)) + && nonlocal_label_list != 0) || prev_code == BARRIER))) i++; - if (code != NOTE - /* Skip a CLOBBER after a CALL_INSN. See similar code in - find_basic_blocks. */ - && ! (prev_code == CALL_INSN - && code == INSN && GET_CODE (PATTERN (insn)) == CLOBBER)) + if (code != NOTE) prev_code = code; } } @@ -443,11 +436,7 @@ find_basic_blocks (f, nonlocal_label_list) || (GET_RTX_CLASS (code) == 'i' && (prev_code == JUMP_INSN || (prev_code == CALL_INSN - && nonlocal_label_list != 0 - /* Ignore if CLOBBER since we consider this - part of the CALL. See below. */ - && ! (code == INSN - && GET_CODE (PATTERN (insn)) == CLOBBER)) + && nonlocal_label_list != 0) || prev_code == BARRIER))) { basic_block_head[++i] = insn; @@ -481,13 +470,7 @@ find_basic_blocks (f, nonlocal_label_list) BLOCK_NUM (insn) = i; - /* Don't separate a CALL_INSN from following CLOBBER insns. This is a - kludge that will go away when each CALL_INSN records its USE and - CLOBBERs. */ - - if (code != NOTE - && ! (prev_code == CALL_INSN && code == INSN - && GET_CODE (PATTERN (insn)) == CLOBBER)) + if (code != NOTE) prev_code = code; } @@ -1494,6 +1477,15 @@ propagate_block (old, first, last, final, significant, bnum) { register int i; + rtx note; + + for (note = CALL_INSN_FUNCTION_USAGE (insn); + note; + note = XEXP (note, 1)) + if (GET_CODE (XEXP (note, 0)) == USE) + mark_used_regs (old, live, SET_DEST (XEXP (note, 0)), + final, insn); + /* Each call clobbers all call-clobbered regs that are not global. Note that the function-value reg is a call-clobbered reg, and mark_set_regs has already had -- 2.47.2