diff options
author | Jeffrey A Law <law@cygnus.com> | 1997-12-27 23:34:14 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1997-12-27 16:34:14 -0700 |
commit | 2c3a56ad15b80efe217db30809f6260d3496b63a (patch) | |
tree | 3450b3238e348a9bf8665d61cfa21618cf96a733 /gcc/flow.c | |
parent | fc97718fe2a117455e63435b0803ab0c2e344e7b (diff) | |
download | gcc-2c3a56ad15b80efe217db30809f6260d3496b63a.zip gcc-2c3a56ad15b80efe217db30809f6260d3496b63a.tar.gz gcc-2c3a56ad15b80efe217db30809f6260d3496b63a.tar.bz2 |
flow.c (find_basic_blocks): Don't create a new basic block for calls in a LIBCALL block.
* flow.c (find_basic_blocks): Don't create a new basic block
for calls in a LIBCALL block.
From-SVN: r17247
Diffstat (limited to 'gcc/flow.c')
-rw-r--r-- | gcc/flow.c | 28 |
1 files changed, 25 insertions, 3 deletions
@@ -284,6 +284,7 @@ flow_analysis (f, nregs, file) register rtx insn; register int i; rtx nonlocal_label_list = nonlocal_label_rtx_list (); + int in_libcall_block = 0; #ifdef ELIMINABLE_REGS static struct {int from, to; } eliminables[] = ELIMINABLE_REGS; @@ -312,6 +313,12 @@ flow_analysis (f, nregs, file) for (insn = f, i = 0; insn; insn = NEXT_INSN (insn)) { + + /* Track when we are inside in LIBCALL block. */ + if (GET_RTX_CLASS (GET_CODE (insn)) == 'i' + && find_reg_note (insn, REG_LIBCALL, NULL_RTX)) + in_libcall_block = 1; + code = GET_CODE (insn); if (INSN_UID (insn) > max_uid_for_flow) max_uid_for_flow = INSN_UID (insn); @@ -320,7 +327,7 @@ flow_analysis (f, nregs, file) && (prev_code == JUMP_INSN || (prev_code == CALL_INSN && (nonlocal_label_list != 0 || eh_region) - && ! find_reg_note (insn, REG_RETVAL, NULL_RTX)) + && ! in_libcall_block) || prev_code == BARRIER))) i++; @@ -333,6 +340,10 @@ flow_analysis (f, nregs, file) ++eh_region; else if (NOTE_LINE_NUMBER (insn) == NOTE_INSN_EH_REGION_END) --eh_region; + + if (GET_RTX_CLASS (GET_CODE (insn)) == 'i' + && find_reg_note (insn, REG_RETVAL, NULL_RTX)) + in_libcall_block = 0; } } @@ -389,6 +400,7 @@ find_basic_blocks (f, nonlocal_label_list) rtx x, note, eh_note; enum rtx_code prev_code, code; int depth, pass; + int in_libcall_block = 0; pass = 1; active_eh_handler = (rtx *) alloca ((max_uid_for_flow + 1) * sizeof (rtx)); @@ -412,6 +424,12 @@ find_basic_blocks (f, nonlocal_label_list) for (eh_note = NULL_RTX, insn = f, i = -1, prev_code = JUMP_INSN, depth = 1; insn; insn = NEXT_INSN (insn)) { + + /* Track when we are inside in LIBCALL block. */ + if (GET_RTX_CLASS (GET_CODE (insn)) == 'i' + && find_reg_note (insn, REG_LIBCALL, NULL_RTX)) + in_libcall_block = 1; + code = GET_CODE (insn); if (code == NOTE) { @@ -427,7 +445,7 @@ find_basic_blocks (f, nonlocal_label_list) && (prev_code == JUMP_INSN || (prev_code == CALL_INSN && (nonlocal_label_list != 0 || eh_note) - && ! find_reg_note (insn, REG_RETVAL, NULL_RTX)) + && ! in_libcall_block) || prev_code == BARRIER))) { basic_block_head[++i] = insn; @@ -485,13 +503,17 @@ find_basic_blocks (f, nonlocal_label_list) else if (eh_note && (asynchronous_exceptions || (GET_CODE (insn) == CALL_INSN - && ! find_reg_note (insn, REG_RETVAL, NULL_RTX)))) + && ! in_libcall_block))) active_eh_handler[INSN_UID (insn)] = XEXP (eh_note, 0); BLOCK_NUM (insn) = i; if (code != NOTE) prev_code = code; + + if (GET_RTX_CLASS (GET_CODE (insn)) == 'i' + && find_reg_note (insn, REG_RETVAL, NULL_RTX)) + in_libcall_block = 0; } /* During the second pass, `n_basic_blocks' is only an upper bound. |