Well, for now I've disabled generating debug info in my frontend so that I can get work done, but I'd like to know what the problem is. I am calling finalize().<div><br><div class="gmail_quote">On Tue, Sep 6, 2011 at 9:24 AM, Devang Patel <span dir="ltr"><<a href="mailto:dpatel@apple.com">dpatel@apple.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Yup. Now, the debug info nodes do not refer to compile unit.<br>
-<br>
Devang<br>
<div><div></div><div class="h5">On Sep 5, 2011, at 2:23 AM, Duncan Sands wrote:<br>
<br>
> Hi Talin, I mentioned it because the error message you are getting is<br>
> identical (IIRC) to the error message being produced by llvm-gcc before<br>
> this patch went in.<br>
><br>
> Ciao, Duncan.<br>
><br>
> On 05/09/11 11:21, Talin wrote:<br>
>> On Sun, Sep 4, 2011 at 11:38 PM, Duncan Sands <<a href="mailto:baldrick@free.fr">baldrick@free.fr</a><br>
>> <mailto:<a href="mailto:baldrick@free.fr">baldrick@free.fr</a>>> wrote:<br>
>><br>
>> Hi Talin,<br>
>><br>
>>> So, I just sync'd to LLVM tip and added the call to<br>
>> DIBuilder::finalize(). But<br>
>>> even with that change I am getting an error when I try to run llc:<br>
>>><br>
>>> Assertion failed: (TheCU && "Unable to find compile unit!"), function<br>
>>> endFunction, file<br>
>>> /Users/talin/Projects/llvm/lib/CodeGen/AsmPrinter/DwarfDebug.cpp, line 1306.<br>
>>><br>
>>> And looking at the .bc dissassembly, I see there are indeed compile unit<br>
>>> MDNodes, although at this level I can't tell if they are hooked up correctly.<br>
>><br>
>> you might want to take a look at this llvm-gcc commit:<br>
>><br>
>> r137753 | dpatel | 2011-08-16 23:03:26 +0200 (Tue, 16 Aug 2011) | 3 lines<br>
>><br>
>> DIBuilder is moving forward to reduce in memory use by MDNodes. However,<br>
>> DIFactory does not emit debug info in updated form.<br>
>> Use LLVMDebugVersion10 directly here so that debug info nodes produced by<br>
>> DIFactory do not claim to adhere newer structure.<br>
>><br>
>> I'm not sure I understand. I'm using DIBuilder, not DIFactory, since I thought<br>
>> DIFactory was deprecated.<br>
>><br>
>> Ciao, Duncan.<br>
>><br>
>>><br>
>>> On Wed, Aug 31, 2011 at 9:07 AM, Devang Patel <<a href="mailto:dpatel@apple.com">dpatel@apple.com</a><br>
>> <mailto:<a href="mailto:dpatel@apple.com">dpatel@apple.com</a>><br>
>>> <mailto:<a href="mailto:dpatel@apple.com">dpatel@apple.com</a> <mailto:<a href="mailto:dpatel@apple.com">dpatel@apple.com</a>>>> wrote:<br>
>>><br>
>>><br>
>>> On Aug 22, 2011, at 6:48 AM, Irina Lipov wrote:<br>
>>><br>
>>>> Hi,<br>
>>>> I saw your update regarding "/The |DIBuilder| interface used by<br>
>> front ends<br>
>>>> to encode debugging information in the LLVM IR now expects clients<br>
>> to use<br>
>>>> |DIBuilder::finalize()| at the end of translation unit to complete<br>
>>>> debugging information encoding"/<br>
>>>> Does it mean that in the new version you defer emission of some debug<br>
>>>> info until the translation is finished and this is a reason to use<br>
>>>> DIBuilder::finalize?<br>
>>><br>
>>> Before this change, each type, subprogram and global variable information<br>
>>> used to refer compile unit directly. Now, the compile unit keeps track of<br>
>>> all these info directly. The compile unit MDNode is updated in the<br>
>>> ::finalize() with list of types, subprograms etc..<br>
>>> -<br>
>>> Devang<br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> LLVM Developers mailing list<br>
>>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>><br>
>> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>>><br>
>> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>>><br>
>>><br>
>>> --<br>
>>> -- Talin<br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> LLVM Developers mailing list<br>
>>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>><br>
>> _______________________________________________<br>
>> LLVM Developers mailing list<br>
>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <mailto:<a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a>> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>><br>
>><br>
>><br>
>><br>
>> --<br>
>> -- Talin<br>
><br>
> _______________________________________________<br>
> LLVM Developers mailing list<br>
</div></div>> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<div><div></div><div class="h5">> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br>-- Talin<br>
</div>