diff options
author | J"orn Rennecke <joern.rennecke@superh.com> | 2004-06-14 12:09:08 +0000 |
---|---|---|
committer | Joern Rennecke <amylaar@gcc.gnu.org> | 2004-06-14 13:09:08 +0100 |
commit | 623a66fa858ef308693b61e33f2c7ba6686d3151 (patch) | |
tree | a37b5ac1c93cff4befd42e4070615ba42213a250 /gcc/cfgbuild.c | |
parent | ce2a46a203b146e4cf3ebc23ea5de2dba3b4917f (diff) | |
download | gcc-623a66fa858ef308693b61e33f2c7ba6686d3151.zip gcc-623a66fa858ef308693b61e33f2c7ba6686d3151.tar.gz gcc-623a66fa858ef308693b61e33f2c7ba6686d3151.tar.bz2 |
basic-block.h (could_fall_through): Declare.
* basic-block.h (could_fall_through): Declare.
* cfganal.c (can_fallthru): Succeed if the target is EXIT_BLOCK_PTR.
Fail if the source already has a fallthrough edge to the exit
block pointer.
(could_fall_through): New function.
* cfgbuild.c (make_edges): Check if we already have a fallthrough
edge to the exit block pointer.
* cfglayout.c (fixup_fallthru_exit_predecessor): Check that it is
not called before reload has completed.
Handle special case of first block having a fall-through exit edge.
(cfg_layout_finalize): Don't call it before reload or if we have
rtl epilogues.
(fixup_reorder_chain): A fall through to the exit block does not
require the block to come last. Add sanity checks.
* cfgrtl.c (rtl_split_edge): Add special handling of fall through
edges to the exit block.
* function.c (cfglayout.h): #include.
(thread_prologue_and_epilogue_insns): If we have neither return nor
epilogue, but a fall through to the exit block from mid-function,
force a non-fall-through exit.
* Makefile.in (function.o): Depend on CFGLAYOUT_H.
From-SVN: r83089
Diffstat (limited to 'gcc/cfgbuild.c')
-rw-r--r-- | gcc/cfgbuild.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index 0cef94e..8402dad 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -267,6 +267,7 @@ make_edges (rtx label_value_list, basic_block min, basic_block max, int update_p rtx insn, x; enum rtx_code code; int force_fallthru = 0; + edge e; if (GET_CODE (BB_HEAD (bb)) == CODE_LABEL && LABEL_ALT_ENTRY_P (BB_HEAD (bb))) @@ -389,6 +390,12 @@ make_edges (rtx label_value_list, basic_block min, basic_block max, int update_p /* Find out if we can drop through to the next block. */ insn = NEXT_INSN (insn); + for (e = bb->succ; e; e = e->succ_next) + if (e->dest == EXIT_BLOCK_PTR && e->flags & EDGE_FALLTHRU) + { + insn = 0; + break; + } while (insn && GET_CODE (insn) == NOTE && NOTE_LINE_NUMBER (insn) != NOTE_INSN_BASIC_BLOCK) |