Disappearing REG_LABEL notes

Jeffrey A Law law@upchuck.cygnus.com
Mon May 31 20:56:00 GMT 1999


  In message < 14126.56387.214202.187971@ongaonga.elec.canterbury.ac.nz >you writ
e:
  > Jeffrey A Law writes:
  >  > Sort term, don't split such insns :-)  Or arrange for the backend to mak
  > e sure
  >  > the label_ref is attached to one of the new instructions.
  > 
  > I think this is the proper fix (although the reconstitution of notes
  > in general could do with an overhaul).  Without it, many of the
  > routines in tinfo.cc generate incorrect code for the C4x.
  > 
  > Michael.
  > 
  > 
  > Tue May  4 22:18:41 1999  Michael Hayes  <m.hayes@elec.canterbury.ac.nz>
  > 
  > 	* loop.c (add_label_notes): Remove static.
  > 	* rtl.h (add_label_notes): Add prototype.
  > 	* emit-rtl.c (try_split): Call add_label_notes if split insn
  > 	has a REG_LABEL note.
You know what might be a whole lot simpler would be to set
rebuild_label_notes_after_reload if we ever split an insn with a REG_LABEL
note during the reload splitters.

Thoughts?

Yes, finding a way to clean this stuff up would be good.  But my gut tells me 
to hold off until after gcc-2.95.

Right now we have some code which updates them on the fly when splitting (see
haifa-sched.c).

We have other code that tries to update them on the fly during loop and
gcse (which is nearly idential and I believe can easily be merged).

We have other hunks of code which scraps the old notes and rebuilds them from
scratch that we're currently using to rebuild the notes after cse or reload as
needed (each handles stuff a little differently,but both work on the same
principal).

I suspect we need two schemes -- one for updating on the fly to be shared by
sched, loop & gcse and another for rebuilding which is triggered by actions
which make updating on the fly hard (ie, adding pseudos which are equivalent
to REG_LABELs to equivalence tables).

jeff



jeff



More information about the Gcc-patches mailing list