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: [PR67335] drop dummy zero from reverse VTA ops, fix infinite recursion


On Nov 27, 2015, Jakub Jelinek <jakub@redhat.com> wrote:

> I'm sorry, but I don't remember.  Perhaps it has been before some recursion
> prevention has been added or whatever, maybe your own PR52001?

Yeah.  Thanks anyway.

> Have you checked if your patch results in any significant debug info quality
> changes

It might seem a bit Surprising, but there are no differences whatsoever
between stage3-*/*.o in bootstraps with or without the patch, except for
stage3-gcc/var-tracking.o and stage3-gcc/alias.o, both because of
changes to the source code.

AFAICT the only significant difference the patch makes is in
canonicalization of equivalent values, so that we merge into the same
value equivalences coming from both V and (plus V V0) (where V0 is a
value known to be (const_int 0).

It doesn't immediately affect (plus (plus V V0) V0), though; I think
we'd have to break up the two pluses in a debug insn into separate uops
in var-tracking to get it to do so, or attempt to simplify the incoming
rtl so that both V0s get dropped.


As it stands, the values only get merged in the testcase at the later
insn that computes the second plus in (plus (plus V V0) V0), at which
point the reverse op simplifies to V and then we combine them all.  It's
precisely when we attempt to determine the VALUE for the reverse op of
this second insn that we used to get into infinite recursion.

After the patch, we'll have recognized (plus V V0) as equivalent to V
during the reverse_op of an earlier insn, between the debug insn and the
second plus, and that equivalence cuts off the infinite recursion when
checking they're equal for cselib.

-- 
Alexandre Oliva, freedom fighter    http://FSFLA.org/~lxoliva/
You must be the change you wish to see in the world. -- Gandhi
Be Free! -- http://FSFLA.org/   FSF Latin America board member
Free Software Evangelist|Red Hat Brasil GNU Toolchain Engineer


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