Commit 74d7ab55 by Jason Merrill Committed by Jason Merrill

flow.c (find_basic_blocks): A CALL_INSN that can throw starts a new basic block.

	* flow.c (find_basic_blocks): A CALL_INSN that can throw starts
	a new basic block.
	(find_basic_blocks_1): Likewise.

From-SVN: r17055
parent 0776059e
Thu Dec 11 22:02:10 1997 Jason Merrill <jason@yorick.cygnus.com>
* flow.c (find_basic_blocks): A CALL_INSN that can throw starts
a new basic block.
(find_basic_blocks_1): Likewise.
Thu Dec 11 21:08:48 1997 Jason Merrill <jason@yorick.cygnus.com> Thu Dec 11 21:08:48 1997 Jason Merrill <jason@yorick.cygnus.com>
* except.c (use_eh_context): Don't copy_rtx a REG. * except.c (use_eh_context): Don't copy_rtx a REG.
......
...@@ -304,6 +304,7 @@ flow_analysis (f, nregs, file) ...@@ -304,6 +304,7 @@ flow_analysis (f, nregs, file)
{ {
register RTX_CODE prev_code = JUMP_INSN; register RTX_CODE prev_code = JUMP_INSN;
register RTX_CODE code; register RTX_CODE code;
int eh_region = 0;
max_uid_for_flow = 0; max_uid_for_flow = 0;
...@@ -316,7 +317,7 @@ flow_analysis (f, nregs, file) ...@@ -316,7 +317,7 @@ 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 || eh_region))
|| prev_code == BARRIER))) || prev_code == BARRIER)))
i++; i++;
...@@ -325,6 +326,10 @@ flow_analysis (f, nregs, file) ...@@ -325,6 +326,10 @@ flow_analysis (f, nregs, file)
if (code != NOTE) if (code != NOTE)
prev_code = code; prev_code = code;
else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_BEG)
++eh_region;
else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END)
--eh_region;
} }
} }
...@@ -418,7 +423,7 @@ find_basic_blocks (f, nonlocal_label_list) ...@@ -418,7 +423,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 || eh_note)
&& ! find_reg_note (insn, REG_RETVAL, NULL_RTX)) && ! find_reg_note (insn, REG_RETVAL, NULL_RTX))
|| prev_code == BARRIER))) || prev_code == BARRIER)))
{ {
......
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