This is the mail archive of the
mailing list for the GCC project.
Re: [patch] tree-cfg.c: Remove duplicate code.
> > 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 <firstname.lastname@example.org>
> > * 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.