This is the mail archive of the gcc@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: Problems recreating REG_DEAD notes during sched2



  In message <199905131659.MAA19356@jwlab.FEITH.COM>you write:
  > I ran into a couple of problems getting sched2 to recreate REG_DEAD
  > notes.
  > 
  >   1) The prologue and epilogue is emitted as RTL (if supported by the
  >      port) after flow2 which causes create_reg_dead_note to get unhappy.
  >      What happens is sched2 sees the prologue pushing a register so it
  >      decides to add a REG_DEAD note which causes a shortage of death
  >      notes.  Currently I have attach_deaths_insn ignore the insn if it's
  >      frame related.
That seems reasonable.

  > 
  >   2) schedule_insns has the comment:
  > 
  >        /* We create no insns here, only reorder them, so we
  >           remember how far we can cut back the stack on exit.  */
  > 
  >      Further below this comment is:
  > 
  >        split_block_insns (b, reload_completed == 0 || ! flag_schedule_insns
  > );
  > 
  >      which I believe creates new instructions.  Several testcases
  >      are failing in create_reg_dead_note (due to a shortage of death
  >      notes) where sched2 is attaching REG_DEAD notes to insns which
  >      don't appear in the flow2 dump.
  > 
  > Should I just change create_reg_dead_note so that it creates new notes
  > as needed?  I'm open to suggestions on how to proceed.
I think the comment is out of date.  post-reload splitting in sched was added
fairly recently and it isn't exercised a whole lot in my experience.

I'm still a little unclear on how you're getting the abort.  The death notes
should have been accurate before sched started and have to be accurate after
sched finishes.  Generally this means that the number of killed registers
remains the same.  When precisely is that not the case?

jeff


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