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: Remove duplicate code.


Hi Jeff,

> > Attached is a patch to remove duplicate code.
> > 
> > tree_make_forwarder_block tries to reverse a PHI chain.  We already
> > have nreverse, so we should use it.
> > 
> > Tested on i686-pc-linux-gnu.  OK to apply?
> > 
> > Kazu Hirata
> > 
> > 2004-11-08  Kazu Hirata  <kazu@cs.umass.edu>
> > 
> > 	* tree-cfg.c (tree_make_forwarder_block): Use nreverse.
> Err, if you use nreverse, then you're assuming that PHI_CHAIN is
> the same as TREE_CHAIN, which is something I don't think we want to
> do long term.

OK.  Then can I create a function like phi_reverse that's just a
wrapper for nreverse?  Note that tree-cfg.c already has one instance
of nreverse being used to reverse a PHI chain.

Kazu Hirata


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