This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][rtl-optimization] Fix PR23726
David Edelsohn wrote on Dienstag, 6. September 2005 17:25 :
> This looks like a good catch, but do you really think it is a good
> idea to have every port modify its patterns to add REG_EQUAL notes when
> multiple results are produced. Shouldn't CSE look inside the PARALLELs or
> the generated code for the PARALLEL automatically add REG_EQUAL notes?
>
> David
IMO we should distinguish two issues. The double-set issue and the
"sequence_with_two_results" issue. I completely agree that CSE should look
into the inside of parallels.
IMO, this will help much for individual insn that produce two results. It
could not, however, make the REG_EQUAL notes obsolete for expanded
multi-value sequences. The key difficulty I recognize is that it is
frequently not possible to express the side effect sufficiently detailed for
CSE, only by using the input operands of the last insn of the sequence that
generates multiple results. E.g. If you think about expanding a minus:DI into
one minus:SI and one minus_with_borrow:SI, you you will need the input
operands of *both* insn in order to describe what value resides in the CCreg
after the sequence.
Also when one of the results of an expanded sequence does not end up in a
pseudo but in a hard regs, CSE most probably will not find the common
expression. I expect this to be true also for the case of condition code
values that end up in hard regs although I have not verified this so far.
Yours,
Bjoern