This is the mail archive of the
mailing list for the GCC project.
Line number notes revamp?
- To: gcc at gcc dot gnu dot org, rth at cygnus dot com
- Subject: Line number notes revamp?
- From: Jan Hubicka <jh at suse dot cz>
- Date: Wed, 12 Sep 2001 16:46:43 +0200
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?