This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch] tree-cfg.c: Speed up thread_jumps () - Part 2


On Mon, 2004-10-04 at 10:59, Kazu Hirata wrote:
> Hi,
> 
> 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)
>     break;
> 
> will never trigger.
> 
> The patch removes the "if" statement that never triggers.
> 
> Tested on i686-pc-linux-gnu on top of
> 
> http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00169.html
> http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00186.html
> http://gcc.gnu.org/ml/gcc-patches/2004-10/msg00279.html
> 
> OK to apply?
> 
> Kazu Hirata
> 
> 2004-10-04  Kazu Hirata  <kazu@cs.umass.edu>
> 
> 	* tree-cfg.c (thread_jumps): Remove a duplicate check for
> 	an infinite loop.
This is fine too.

jeff



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]