[llvm-commits] [PATCH] Dwarf: support for LTO where a single object file can have multiple line tables

Manman Ren mren at apple.com
Wed Jan 30 11:40:05 PST 2013


On Jan 30, 2013, at 11:24 AM, Eric Christopher <echristo at gmail.com> wrote:

>> Made quite a few changes between the two versions (including adding a test case, that's a good start), but didn't explain what the problems you were fixing were. What problems were you running into that needed changing?
> 
> My bad. Since there was no response on the first patch, I assumed people will just look at the updated patch.
> The updated patch makes sure we generate the same code when there is only one compile unit.
> And the line table will be emitted in the order of CUID.
> 
> 
> That all makes sense. 
>> 
>> The MCLineIDs bit seems unwieldy and probably could be done a different way.
>> 
> 
> Any thoughts here? 
I used MCLineIDs for fast look-up, do you have any suggestion on what to use here?

>> The bit with CUID = -1 or CUID == 0 seems confusing, can you explain this a bit? At times -1 seems to be for invalid CUs and at other times the first/only CU?
> "-1" is the default CUID, when DwarfDebug does not exist.
> So the first line table will be for CUID 0 when DwarfDebug exists, and will be for CUID -1 when DwarfDebug does not exist.
> 
> 
> This seems a bit confusing. Since, for example, we emit a CU for assembly files and so something will always be emitting a CU. I could easily not be seeing something though. At worst it really needs some comments.
I added some comments.
+  // CUID and MCLineTableSymbols are set in DwarfDebug, when DwarfDebug does
+  // not exist, CUID will be -1 and MCLineTableSymbols will be empty. 

Updated patch is attached.

Thanks for reviewing,
Manman
> 
>> There's really no need to keep track of the first line table for the section since the only reason the symbol is ever used is to get the offset in cases where a relocation is necessary.
> That is true, but it is weird to me if we keep the start symbols for other line tables except the first. Let me know whether this should be changed.
> 
> 
> Hmm.. I may have misread but I thought you still had the section symbol and the line table symbol. If you only have one of those two that's fine. (It's not really much other than a cleanliness issue anyhow).
> 
> -eric 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130130/23aea6fc/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: line_table.patch
Type: application/octet-stream
Size: 16313 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130130/23aea6fc/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130130/23aea6fc/attachment-0001.html>


More information about the llvm-commits mailing list