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]

Re: Line number notes revamp?

Jan Hubicka <> writes:

>> Richard Henderson wrote:-
>> > > You need column number as well.
>> > 
>> > No I don't.  We don't have one now.  Further, I thought Niel was
>> > talking about hashing file+line+column together into a single number.
>> No, I've put file + line into a single number, but since we wanted to
>> be able to support really large files, column numbers will be a
>> separate 16-bit quantity to line numbers.  I have no intention of
>> doing much else in this area; I don't think much can be done.
> I was thinking about reserving separate field in instruction overnight too.
> I believe it should be done in a way that the field points to LINFO RTX,
> that has needed information - that way we can add column or whatever
> we want later w/o renumbering fields in the INSN rtx itself.

Then you run into the problem Richard pointed out, that we end up
allocating an extra 4 bytes (minimum) for each RTX with a line number.
It's cheaper to just put them directly in the RTX.

You only need to add one or two fields to the end of INSN, CALL_INSN,

> Also I see one problem with GCOV.  For that pass our current behaviour
> is far supperrior to the notes on instructions.  Be I see that:
> 1) in longer term, profiling should be very first optimization pass, so we can
>    kill line notes afterwards
> 2) it may make sense to give up gcov on the optimized code in short term, as it
>    don't work currently perfectly anyway.
> Otherwise if the plan sounds resonable, I will probably invest my time into
> it, once I am finished with the CFG cleanups I am working on
> currently.
Would you like the patch I have which modifies rtl.h and everywhere
else to use a line number in RTX (The tricky parts are in final.c)?

It definitely improves our line numbers for optimization.

Currently, we jump around and such, so that "next" on a line that
inits a variable, really doesn't init the variable until the second
time you hit that line (IE GDB jumps back to it again). With the
patch, we don't have this problem.

> Concerning the new inssn - I agree that for spilling code we don't want
> to attach line number.  Case where we want to is instruction splitting and
> combinning, so we definitly need to be able do both.
> Concerning multiple statements per single instruction - I am also not quite
> sure it makes sense. Is there some debug format able to do that?
DWARF2 can do it, since it supports statement fragments and whatnot.

> Honza
> > Neil.

"If you were going to shoot a mime, would you use a silencer?
"-Steven Wright

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