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]

Re: Reload patch v4



  In message <Pine.GSO.4.02A.9809111407210.11312-100000@matlock.informatik.rwth
-aachen.de>you write:
  > > 
  > > I think we need to fix forget_old_reloads_1 to handle cases where we
  > > store into a pseudo which happens to be allocated to a hard reg that
  > > has also been used as a spill reg.  Imagine
  > > 
  > > 	Use reg 0 as an output reload for some value V
  > > 
  > > 	Psuedo X is made live and is allocated to reg 0
  > > 	[ ... ]
  > > 	Pseudo X dies
  > > 
  > > 	Use of V which needs an input reload.
  > > 
  > > In this case we might try and use reg0 to satisfy the input reload
  > > even though it no longer holds the value we need.
  > 
  > I'm not convinced yet that anything is broken.  The situation you describe
  > could already occur with the old reload code, since it has some simple code
  > to avoid spilling within one basic block.
We only avoid spilling a pseudo in a block if the block needed no spilling of
any class that contains the hard register the pseudo was allocated to.

Thus if we use reg0 to hold an output reload, then no pseudos can be allocated
to reg0 in that block and thus the above situation can not currently occur.

[ Remember, we can't inherit a reload across basic block boundaries, at least
  we shouldn't do it right now :-) ]


  > In the above example, if pseudo X is allocated to reg 0, its rtl will have
  > been modified to look like hard reg 0 by the time forget_old_reloads_1 runs > .
  > And in that case, the following piece of code in find_old_reloads_1 should
  > run.
Normally I would agree with you, but if the pseudo's rtl had been changed,
then why does forget_old_reload_1 check for regno >= FIRST_PSEUDO_REGISTER?

I *know* pseudos can be passed to that function.  I've seen it happen.  When
they do, they do not go through the code you quoted.


jeff


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