[llvm-dev] Handling of metadata in llvm::CloneModule

Sergei Larin via llvm-dev llvm-dev at lists.llvm.org
Tue Jan 26 09:24:25 PST 2016


I was afraid of that... 

Can I approach it from a different direction and clean up "dead" debug nodes in the module split code? That should be possible in the fashion of StripDeadDebugInfo (lib/Transforms/IPO/StripSymbols.cpp)

I currently is unable to link splitted module when -g is used...

Sergei

---
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation


> -----Original Message-----
> From: mehdi.amini at apple.com [mailto:mehdi.amini at apple.com]
> Sent: Tuesday, January 26, 2016 11:17 AM
> To: Sergei Larin
> Cc: llvm-dev at lists.llvm.org
> Subject: Re: [llvm-dev] Handling of metadata in llvm::CloneModule
> 
> Hi Sergei,
> 
> The issue of importing only the minimum amount metadata is really non-
> trivial. You may want to have a look at:
> 
> http://reviews.llvm.org/D16440: [ThinLTO] Link in only necessary
> DICompileUnit operands
> 
> 
>> Mehdi
> 
> 
> > On Jan 26, 2016, at 9:14 AM, Sergei Larin via llvm-dev <llvm-
> dev at lists.llvm.org> wrote:
> >
> >
> > Sorry if this has been discussed already...
> >
> > I am trying to understand whether there is an underlying reason why
> llvm::CloneModule takes argument function ShouldCloneDefinition to
> discriminate on objects being cloned, but blindly copies all named
> metadata...?
> >
> > In my case this results in debug nodes that are creating uses/relocations for
> global objects that were _not_ copied per ShouldCloneDefinition...
> >
> > Before I jump head on into unfamiliar code, I would like to understand why
> this wheel was not invented in the first place :)
> >
> > Thanks.
> >
> > Sergei Larin
> >
> > P.S. Also, if this does need fixing, please suggest the proper strategy for it...
> Thanks.
> >
> > ---
> > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum,
> hosted by The Linux Foundation
> >
> >
> >
> > _______________________________________________
> > LLVM Developers mailing list
> > llvm-dev at lists.llvm.org
> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev




More information about the llvm-dev mailing list