This is the mail archive of the gcc-bugs@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]
Other format: [Raw text]

[Bug lto/65536] [5 regression] LTO line number information garbled


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65536

--- Comment #2 from Richard Biener <rguenth at gcc dot gnu.org> ---
The main issue with LTO is that it re-creates a combined linemap but in (most
of the time) quite awkward ordering (simply registering random-ordered
file:line:column entries by switching files/lines "appropriately").

I've argued that it would be better to stream those file:line:columns
separately so we can "sort" them before handing them over to libcpp for
linemap re-creation.

So currently we do, for each "file:line:column" location we stream in:

  if (file_change)
    {
      if (prev_file)
        linemap_add (line_table, LC_LEAVE, false, NULL, 0);

      linemap_add (line_table, LC_ENTER, false, current_file, current_line);
    }
  else if (line_change)
    linemap_line_start (line_table, current_line, current_col);

  return linemap_position_for_column (line_table, current_col);

which of course puts a heavy load on the linemap encoding...

But it should definitely work (not sure what it does on line or file
"overflow").


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