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] PR optimization/11741: PRE multiple sets in a PARALLEL


Hi,

On Thu, 4 Sep 2003 law@redhat.com wrote:

>  >This is not the right way to think.  I know for a fact the patch
>  >will cause other problems; I havn't bothered to find a test case,
>  >but it would only be a matter of time.
> I agree with Richard here.  Failure to treat the parallel elements at a
> single unit is ultimately going to fail

Not necessarily.  I think you and Richard somehow mixed up what the patch
does.

> If you try to allow elements of a parallel to independently make later
> non-parallel expressions rundundant, then you open a rather nasty can of
> worms in terms of placement of the parallel to make all the later
> expressions fully redundant.

You don't have to place the full parallel somewhere.  There are two
situations involving parallels:
1) some part of the parallel makes another single insns partially
   reduntant
2) a collection of insns makes a parallel redundant (i.e. all individual
   sets are partially redundant at that point)

Noone is going to argue for handling case 2, which indeed is over the top.
But handling case 1 is easy.  Parallel P makes insn I partially redundant,
so (try to) insert copy of I at some edges to make I fully redundant and
delete I.

As I is a non-parallel insn this involves exactly the same things as
normal non-parallel lcm.  I.e. having parallels as _sources of redundancy_
doesn't change the algorithm at all.  Those expressions just have to be
detected and handled.

Having said that I disagree with Richard that this particular patch would
create problems anywhere else (which aren't genuine bugs in those other
parts).  It's not introducing generating parallels in GCSE, a similar
patch is on the hammer branch since some months and AFAIK didn't show any
problems on several platforms in several thousand packages.

> In fact, in the short time I've thought about this, I can't even convince
> myself that you will in general have a location in the CFG which meets all

This is not what the patch does.  Please read it again.


Ciao,
Michael.


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