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


On Wed, 3 Sep 2003, Richard Henderson wrote:
> On Tue, Sep 02, 2003 at 04:15:04PM -0600, Roger Sayle wrote:
> > Unfortunately there's a mismatch.  The code in hash_scan_insn that
> > places available expressions in the expr hash table is happy to deal
> > with parallels containg multiple sets.
>
> This is the bug, because the code in the middle that does
> the LCM isn't happy to deal with this.  Indeed, afaik it'll
> treat the two expressions separately, and may decide to put
> them in different places.  Which is not cool.
>
> Thus changing pre_insert_copy_insn is exactly wrong.

Hypothetically, wouldn't a GCSE that could handle multiple sets
in a parallel be an improvement over one that couldn't?

Before dropping this patch [which solves a PR, because there might
be a bug elsewhere in the compiler, which hasn't yet caused a PR]
perhaps we should investigate what it would take to make LCM
multi-set parallel safe?  GCSE's cprop and bypass, for example,
appear to be happy with the current hash_scan_insn implementation.
Rather than "exactly wrong" changing pre_insert_copy_insn would
seem to be a step in the right direction, even if it isn't the
complete solution.

Unfortunately, many of the comments in gcse.c appear to be out
of date, so following the logic isn't easy.  Could you or Jeff
explain which part of the LCM code in gcse.c would need fixing?

Very many thanks in advance,

Roger
--


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