This is the mail archive of the 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]

Line number notes revamp?

while I am at the grand cleanups, I got idea to reorganize way line number
notes are handled.  To my opinion, the current way of emitting line number
notes to the insn stream is goot for RTL construction pass, but nightmare
to keep up to date when performing code motion.

Exception handling gets around quite easilly by using note in the generation
and then convert it to the REG notes.  I think for line numbers we should use
same - have REG_LINENUM note that has value pointing to the linenum record -
eighter represented in RTL as (linenum line column string) or separately.  (we
may want to attach multiple lines to single insn in combining).

I believe that this is more robust for optimizers - newly generated code will
miss lines, but for a lot of code this is OK (such as register spilling),
later we may add linenum_emit_insn instruction familly to handle this in cases
we want to emit new instruction with line number information atached.

I promise from the solution following
  - more exact debug information  (even with optimizing)
  - no more problems with different code generated at -g
  - easier code in scheduler
  - one purpose fewer to have something in between basic blocks

If this sounds sane, I would probably try to do that next week on the CFG

What do you think?


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