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: update_equiv_regs() and dependency chains


At 15:34 17.05.2002, David S. Miller wrote:
>    From: "David S. Miller" <davem@redhat.com>
>    Date: Fri, 17 May 2002 04:35:10 -0700 (PDT)
>
>[ Replying to myself as often occurs... :-) ]
>
>    update_equiv_regs() seems to not be able to handle reg_equiv[] sources
>    that are first replaced by other equivalences.
>  ...
>    So now we have a problem because the 'src' in reg_equiv[120] still
>    refers to REG 184 even though we've killed it off.  That is, the
>    reg_equiv[].src members are not updated when an equivalence
>    transformation is performed.
>
>So after some thought on how to deal with this, it seems that the
>easiest solution is to record the source using the address of the RTX.
>
>This way, if a replacement occurs it will propagate into the sources
>of other equivalences.  I thought about how changes to the RTX pointed
>to might invalidate our equivalence tests.  That should be OK because
>we will be replacing the source with something else known to be
>equivalent.  QED :-)
>
>This patch below fixes the ICE in PR c/6689, and the resulting RTL
>looks fine.  I'm testing a full bootstrap/testsuite run of this right
>now on sparc-linux, and I'll fire one up on sparc64-linux and
>i686-linux as well to really make sure this change doesn't have some
>weird side effect.
>
>Mark, this is a regression from 3.0 and egcs-1.1.x  Ok for the branch
>if all of my bootstrap+regression runs pass?
>
>2002-05-17  David S. Miller  <davem@redhat.com>
>
>         PR c/6689
>         * local-alloc.c (struct equivalence): Rename 'src' to 'src_p'
>         and make it a pointer to rtx.  Update comments.
>         (update_equiv_regs): When scanning for equivalences, record
>         address of SET_SRC (set) in reg_equiv[].src_p.  Dereference
>         it while making the equiv replacements.

This solves the high priority PR optimization/6615 as well. Running a 
bootstrap on powerpc-linux-gnu now.

Thanks,
Franz.


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