diff options
author | Richard Henderson <rth@redhat.com> | 2003-06-07 14:30:49 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2003-06-07 14:30:49 -0700 |
commit | 1722c2c871e9657e3d4db707816b5e6abe0ad2e8 (patch) | |
tree | 4c3e6dfddffa34e347102a0a9603cb42a831546b /gcc | |
parent | 5145a02e5ddfd75dfb212e5ab165b21cec63fe18 (diff) | |
download | gcc-1722c2c871e9657e3d4db707816b5e6abe0ad2e8.zip gcc-1722c2c871e9657e3d4db707816b5e6abe0ad2e8.tar.gz gcc-1722c2c871e9657e3d4db707816b5e6abe0ad2e8.tar.bz2 |
basic-block.h (EDGE_SIBCALL): New.
* basic-block.h (EDGE_SIBCALL): New.
(EDGE_ALL_FLAGS): Update.
* cfg.c (dump_edge_info): Add sibcall name.
* cfgbuild.c (make_edges): Use EDGE_SIBCALL.
* cfgrtl.c (purge_dead_edges): Handle sibcalls.
From-SVN: r67602
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 8 | ||||
-rw-r--r-- | gcc/basic-block.h | 3 | ||||
-rw-r--r-- | gcc/cfg.c | 6 | ||||
-rw-r--r-- | gcc/cfgbuild.c | 3 | ||||
-rw-r--r-- | gcc/cfgrtl.c | 13 |
5 files changed, 28 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 10efafa..14a02ea 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2003-06-07 Richard Henderson <rth@redhat.com> + + * basic-block.h (EDGE_SIBCALL): New. + (EDGE_ALL_FLAGS): Update. + * cfg.c (dump_edge_info): Add sibcall name. + * cfgbuild.c (make_edges): Use EDGE_SIBCALL. + * cfgrtl.c (purge_dead_edges): Handle sibcalls. + 2003-06-07 Andreas Jaeger <aj@suse.de> * mklibgcc.in (lib2funcs): Remove _exit. diff --git a/gcc/basic-block.h b/gcc/basic-block.h index a229367..4aa47dd 100644 --- a/gcc/basic-block.h +++ b/gcc/basic-block.h @@ -151,7 +151,8 @@ typedef struct edge_def { #define EDGE_CAN_FALLTHRU 64 /* Candidate for straight line flow. */ #define EDGE_IRREDUCIBLE_LOOP 128 /* Part of irreducible loop. */ -#define EDGE_ALL_FLAGS 255 +#define EDGE_SIBCALL 256 /* Edge from sibcall to exit. */ +#define EDGE_ALL_FLAGS 511 #define EDGE_COMPLEX (EDGE_ABNORMAL | EDGE_ABNORMAL_CALL | EDGE_EH) @@ -652,8 +652,10 @@ dump_edge_info (file, e, do_succ) if (e->flags) { - static const char * const bitnames[] - = {"fallthru", "ab", "abcall", "eh", "fake", "dfs_back", "can_fallthru","irreducible"}; + static const char * const bitnames[] = { + "fallthru", "ab", "abcall", "eh", "fake", "dfs_back", + "can_fallthru", "irreducible", "sibcall" + }; int comma = 0; int i, flags = e->flags; diff --git a/gcc/cfgbuild.c b/gcc/cfgbuild.c index 69fcc15..ed8dfb8 100644 --- a/gcc/cfgbuild.c +++ b/gcc/cfgbuild.c @@ -406,8 +406,7 @@ make_edges (label_value_list, min, max, update_p) worry about EH edges, since we wouldn't have created the sibling call in the first place. */ if (code == CALL_INSN && SIBLING_CALL_P (insn)) - cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, - EDGE_ABNORMAL | EDGE_ABNORMAL_CALL); + cached_make_edge (edge_cache, bb, EXIT_BLOCK_PTR, EDGE_SIBCALL); /* If this is a CALL_INSN, then mark it as reaching the active EH handler for this CALL_INSN. If we're handling non-call diff --git a/gcc/cfgrtl.c b/gcc/cfgrtl.c index b0678f0..21208c9 100644 --- a/gcc/cfgrtl.c +++ b/gcc/cfgrtl.c @@ -2299,6 +2299,19 @@ purge_dead_edges (bb) return purged; } + else if (GET_CODE (insn) == CALL_INSN && SIBLING_CALL_P (insn)) + { + /* First, there should not be any EH or ABCALL edges resulting + from non-local gotos and the like. If there were, we shouldn't + have created the sibcall in the first place. Second, there + should of course never have been a fallthru edge. */ + if (!bb->succ || bb->succ->succ_next) + abort (); + if (bb->succ->flags != EDGE_SIBCALL) + abort (); + + return 0; + } /* If we don't see a jump insn, we don't know exactly why the block would have been broken at this point. Look for a simple, non-fallthru edge, |