diff options
author | Kazu Hirata <kazu@cs.umass.edu> | 2004-10-27 18:24:13 +0000 |
---|---|---|
committer | Kazu Hirata <kazu@gcc.gnu.org> | 2004-10-27 18:24:13 +0000 |
commit | af88d4ec96defc06ac0b7ae3e5122f14ba148509 (patch) | |
tree | 22c457b1bb6d0637671d15fe9f288091ef763792 /gcc | |
parent | 7f604986cccc7ce4df07e7f3565e29888a8b4e4b (diff) | |
download | gcc-af88d4ec96defc06ac0b7ae3e5122f14ba148509.zip gcc-af88d4ec96defc06ac0b7ae3e5122f14ba148509.tar.gz gcc-af88d4ec96defc06ac0b7ae3e5122f14ba148509.tar.bz2 |
tree-cfg.c (thread_jumps): Speed up by pretending to have ENTRY_BLOCK_PTR in worklist.
* tree-cfg.c (thread_jumps): Speed up by pretending to have
ENTRY_BLOCK_PTR in worklist.
From-SVN: r89699
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/tree-cfg.c | 10 |
2 files changed, 11 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f3324b..fcafd5f 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2004-10-27 Kazu Hirata <kazu@cs.umass.edu> + * tree-cfg.c (thread_jumps): Speed up by pretending to have + ENTRY_BLOCK_PTR in worklist. + +2004-10-27 Kazu Hirata <kazu@cs.umass.edu> + * tree-ssa-dce.c (mark_stmt_if_obviously_necessary) <GOTO_EXPR>: Don't let an explicit GOTO_EXPR slip through. diff --git a/gcc/tree-cfg.c b/gcc/tree-cfg.c index a963124..4492daa 100644 --- a/gcc/tree-cfg.c +++ b/gcc/tree-cfg.c @@ -3949,6 +3949,10 @@ thread_jumps (void) bb->flags &= ~BB_VISITED; } + /* We pretend to have ENTRY_BLOCK_PTR in WORKLIST. This way, + ENTRY_BLOCK_PTR will never be entered into WORKLIST. */ + ENTRY_BLOCK_PTR->flags |= BB_VISITED; + /* Initialize WORKLIST by putting non-forwarder blocks that immediately precede forwarder blocks because those are the ones that we know we can thread jumps from. We use BB_VISITED to @@ -3973,8 +3977,6 @@ thread_jumps (void) /* We are not interested in threading jumps from a forwarder block. */ if (!bb_ann (e->src)->forwardable - /* We don't want to visit ENTRY_BLOCK_PTR. */ - && e->src->index >= 0 /* We don't want to put a duplicate into WORKLIST. */ && (e->src->flags & BB_VISITED) == 0) { @@ -4014,8 +4016,6 @@ thread_jumps (void) /* We are not interested in threading jumps from a forwarder block. */ if (!bb_ann (f->src)->forwardable - /* We don't want to visit ENTRY_BLOCK_PTR. */ - && f->src->index >= 0 /* We don't want to put a duplicate into WORKLIST. */ && (f->src->flags & BB_VISITED) == 0) { @@ -4028,6 +4028,8 @@ thread_jumps (void) } } + ENTRY_BLOCK_PTR->flags &= ~BB_VISITED; + free (worklist); return retval; |