This is the mail archive of the
mailing list for the GCC project.
Re: [patch] tree-cfg.c: Speed up thread_jumps () - Part 2
- From: Jeffrey A Law <law at redhat dot com>
- To: Kazu Hirata <kazu at cs dot umass dot edu>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 05 Oct 2004 12:23:52 -0600
- Subject: Re: [patch] tree-cfg.c: Speed up thread_jumps () - Part 2
- Organization: Red Hat, Inc
- References: <email@example.com>
- Reply-to: law at redhat dot com
On Mon, 2004-10-04 at 10:59, Kazu Hirata wrote:
> Attached is a patch to speed up thread_jumps().
> When we thread a jump, it is important to notice an infinite loop so
> that we won't end up following forwarder blocks forever.
> thread_jumps() in tree.cfg.c precisely checks for that case, except
> that it does so twice in a row for nothing.
> Consider the "for" loop shown in the patch. When we get into the
> loop, we have
> tree_forwarder_block_p (dest) == true
> meaning that
> bb_ann (dest)->forwardable == 1
> implying that the "if" statment
> if (!bb_ann (dest)->forwardable)
> will never trigger.
> The patch removes the "if" statement that never triggers.
> Tested on i686-pc-linux-gnu on top of
> OK to apply?
> Kazu Hirata
> 2004-10-04 Kazu Hirata <firstname.lastname@example.org>
> * tree-cfg.c (thread_jumps): Remove a duplicate check for
> an infinite loop.
This is fine too.