Sometime about two months ago, something changed in LLVM that broke my frontend's ability to generate debug info. This was around the time that the requirement to call DIBuilder::finalize() was added (and yes, I am calling it.) Specifically, what I am seeing is an assertion failure in llc because it can't find the compile unit for a subroutine. I took a look at the code in DIBuilder.cpp, and I see that indeed it is setting the compile unit to null for all of the various descriptors being created. I assume that the intent is that these references would be filled in later - but apparently this is not happening in my case. Any idea what could be wrong? -- -- Talin -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110923/7dd98c1c/attachment.html>
Devang Patel
2011-Sep-23 20:02 UTC
[LLVMdev] DIBuilder - what's with the null compile units?
On Sep 23, 2011, at 12:39 PM, Talin wrote:> Sometime about two months ago, something changed in LLVM that broke my frontend's ability to generate debug info. This was around the time that the requirement to call DIBuilder::finalize() was added (and yes, I am calling it.) Specifically, what I am seeing is an assertion failure in llc because it can't find the compile unit for a subroutine. > > I took a look at the code in DIBuilder.cpp, and I see that indeed it is setting the compile unit to null for all of the various descriptors being created. I assume that the intent is that these references would be filled in later - but apparently this is not happening in my case.They are not needed any more. During DIBuilder::finalize() the CompileUnit itself collects all required info, which is good enough for CodeGen DwarfWriter. The reason we inverted this graph is because it lets llvm linker unify mdnodes during LTO.> Any idea what could be wrong? > > -- > -- Talin > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Devang Patel
2011-Sep-23 20:06 UTC
[LLVMdev] DIBuilder - what's with the null compile units?
On Sep 23, 2011, at 12:39 PM, Talin wrote:> Sometime about two months ago, something changed in LLVM that broke my frontend's ability to generate debug info. This was around the time that the requirement to call DIBuilder::finalize() was added (and yes, I am calling it.) Specifically, what I am seeing is an assertion failure in llc because it can't find the compile unit for a subroutine.I forgot to say earlier, that's a bug. Please file a PR with a test case. - Devang> > I took a look at the code in DIBuilder.cpp, and I see that indeed it is setting the compile unit to null for all of the various descriptors being created. I assume that the intent is that these references would be filled in later - but apparently this is not happening in my case. Any idea what could be wrong? > > -- > -- Talin > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
James Molloy
2011-Sep-24 08:37 UTC
[LLVMdev] DIBuilder - what's with the null compile units?
Hi, Thanks for bringing this up, I'm just about to investigate an identical case which has broken our front-end. Both ours and clang generate subroutineinfo with null compilationunits, but ours asserts and clang's doesn't. I'll take a look at this on Monday, if it is a bug in LLVM. Cheers, James -----Original Message----- From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Devang Patel Sent: 23 September 2011 21:06 To: Talin Cc: LLVM Developers Mailing List Subject: Re: [LLVMdev] DIBuilder - what's with the null compile units? On Sep 23, 2011, at 12:39 PM, Talin wrote:> Sometime about two months ago, something changed in LLVM that broke my frontend's ability to generate debug info. This was around the time that the requirement to call DIBuilder::finalize() was added (and yes, I am calling it.) Specifically, what I am seeing is an assertion failure in llc because it can't find the compile unit for a subroutine.I forgot to say earlier, that's a bug. Please file a PR with a test case. - Devang> > I took a look at the code in DIBuilder.cpp, and I see that indeed it is setting the compile unit to null for all of the various descriptors being created. I assume that the intent is that these references would be filled in later - but apparently this is not happening in my case. Any idea what could be wrong? > > -- > -- Talin > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev_______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -- IMPORTANT NOTICE: The contents of this email and any attachments are confidential and may also be privileged. If you are not the intended recipient, please notify the sender immediately and do not disclose the contents to any other person, use it for any purpose, or store or copy the information in any medium. Thank you.
Possibly Parallel Threads
- [LLVMdev] DIBuilder - what's with the null compile units?
- [LLVMdev] DIBuilder - what's with the null compile units?
- [LLVMdev] DIBuilder - what's with the null compile units?
- [LLVMdev] DIBuilder - what's with the null compile units?
- [LLVMdev] DIBuilder - what's with the null compile units?