Commit 6b67ec08 by Richard Kenner

(flow_analysis, find_basic_blocks): Change from USE and CLOBBER insns

to using CALL_INSN_FUNCTION_USAGE.

From-SVN: r7242
parent 8c99eaf6
...@@ -347,17 +347,10 @@ flow_analysis (f, nregs, file) ...@@ -347,17 +347,10 @@ flow_analysis (f, nregs, file)
|| (GET_RTX_CLASS (code) == 'i' || (GET_RTX_CLASS (code) == 'i'
&& (prev_code == JUMP_INSN && (prev_code == JUMP_INSN
|| (prev_code == CALL_INSN || (prev_code == CALL_INSN
&& nonlocal_label_list != 0 && nonlocal_label_list != 0)
/* Ignore a CLOBBER after a CALL_INSN here. */
&& ! (code == INSN
&& GET_CODE (PATTERN (insn)) == CLOBBER))
|| prev_code == BARRIER))) || prev_code == BARRIER)))
i++; i++;
if (code != NOTE 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))
prev_code = code; prev_code = code;
} }
} }
...@@ -443,11 +436,7 @@ find_basic_blocks (f, nonlocal_label_list) ...@@ -443,11 +436,7 @@ find_basic_blocks (f, nonlocal_label_list)
|| (GET_RTX_CLASS (code) == 'i' || (GET_RTX_CLASS (code) == 'i'
&& (prev_code == JUMP_INSN && (prev_code == JUMP_INSN
|| (prev_code == CALL_INSN || (prev_code == CALL_INSN
&& nonlocal_label_list != 0 && nonlocal_label_list != 0)
/* Ignore if CLOBBER since we consider this
part of the CALL. See below. */
&& ! (code == INSN
&& GET_CODE (PATTERN (insn)) == CLOBBER))
|| prev_code == BARRIER))) || prev_code == BARRIER)))
{ {
basic_block_head[++i] = insn; basic_block_head[++i] = insn;
...@@ -481,13 +470,7 @@ find_basic_blocks (f, nonlocal_label_list) ...@@ -481,13 +470,7 @@ find_basic_blocks (f, nonlocal_label_list)
BLOCK_NUM (insn) = i; BLOCK_NUM (insn) = i;
/* Don't separate a CALL_INSN from following CLOBBER insns. This is a if (code != NOTE)
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))
prev_code = code; prev_code = code;
} }
...@@ -1494,6 +1477,15 @@ propagate_block (old, first, last, final, significant, bnum) ...@@ -1494,6 +1477,15 @@ propagate_block (old, first, last, final, significant, bnum)
{ {
register int i; 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 /* Each call clobbers all call-clobbered regs that are not
global. Note that the function-value reg is a global. Note that the function-value reg is a
call-clobbered reg, and mark_set_regs has already had call-clobbered reg, and mark_set_regs has already had
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment