[PATCH] D29240: IR: Consider two DISubprograms to be odr-equal if they have the same template parameters.

Duncan P. N. Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 30 21:27:29 PST 2017


> On 2017-Jan-30, at 18:36, Peter Collingbourne <peter at pcc.me.uk> wrote:
> 
> On Mon, Jan 30, 2017 at 6:08 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com <mailto:dexonsmith at apple.com>> wrote:
> I'm having trouble paging this back in.
> 
> IIRC, one goal was to improve compile time by checking fewer fields.
> 
> I thought that was the point of the stuff in getHashValue() ?

Maybe I'm not remembering correctly then...

> 
> That said, over the weekend I had some ideas about how to fix this debug info odr business in a (IMHO) more principled way. If I get a chance I'll send an RFC with a brain dump to llvm-dev.

I'll look forward to it.  I had some (more) principled thing I was tacking toward that I've frankly lost track of; I'll see if I can remind myself in time for your post.

> Do you happen to know why the LinkageName wasn't sufficient here?  Sure, this fixes a crash, but why?
> 
> If we clone a module and try to disambiguate just based on LinkageName we will consider the DISubprogram referring to the cloned DICompileUnit (via TemplateParams) and the one referring to the original DICompileUnit to be the same. That way we will end up with a cloned module containing a non-distinct DISubprogram from the original module, itself referring to a DICompileUnit not appearing in llvm.dbg.cu <http://llvm.dbg.cu/> (i.e. the one from the original module), which fails the verifier.

Ah, this happens when cloning modules.  I hadn't considered that would use a single context.

> Also, for debug info testcases that aren't handmade, we usually include the C/C++ source in comments so that it's easy to regenerate them.  Maybe if I saw the source I would understand the root cause.
> 
> Okay, I'll also add the source. It's basically the test case from https://bugs.chromium.org/p/chromium/issues/detail?id=682773#c14 <https://bugs.chromium.org/p/chromium/issues/detail?id=682773#c14> with the definitions removed.

Thanks!

> 
> Thanks,
> -- 
> -- 
> Peter

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170130/7fbd2dc7/attachment.html>


More information about the llvm-commits mailing list