Peter, I am afraid I am missing a big picture with debug info cloning. Certainly after your patch (and possibly in some cases earlier): Cloning: Reduce complexity of debug info cloning and fix correctness issue. Commit r260791 contained an error in that it would introduce a cross-module reference in the old module. It also introduced O(N^2) complexity in the module cloner by requiring the entire module to be visited for each function. Fix both of these problems by avoiding use of the CloneDebugInfoMetadata function (which is only designed to do intra-module cloning) and cloning function-attached metadata in the same way that we clone all other metadata. Differential Revision: http://reviews.llvm.org/D18583 During CloneFunctionInto we seem to create a new DISubprogram which still carries the name of the _original_ function. which creates certain confusion with debugging scope. Was it designed that way, or am I missing something here. Thanks a lot. Sergei --- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160415/72cdd542/attachment.html>
Peter Collingbourne via llvm-dev
2016-Apr-15 17:02 UTC
[llvm-dev] Can DISubprogram be renamed?
I'd actually like to remove that functionality, as it is unused. See http://reviews.llvm.org/D18628 Adrian's change r266446 I think obsoletes that patch or at least makes it a lot simpler. Peter On Fri, Apr 15, 2016 at 9:50 AM, Sergei Larin <slarin at codeaurora.org> wrote:> > > Peter, > > > > I am afraid I am missing a big picture with debug info cloning. > > > > Certainly after your patch (and possibly in some cases earlier): > > > > Cloning: Reduce complexity of debug info cloning and fix correctness > issue. > > > > Commit r260791 contained an error in that it would introduce a > cross-module > > reference in the old module. It also introduced O(N^2) complexity in > the > > module cloner by requiring the entire module to be visited for each > function. > > Fix both of these problems by avoiding use of the > CloneDebugInfoMetadata > > function (which is only designed to do intra-module cloning) and > cloning > > function-attached metadata in the same way that we clone all other > metadata. > > > > Differential Revision: http://reviews.llvm.org/D18583 > > > > During CloneFunctionInto we seem to create a new DISubprogram which still > carries the name of the _*original*_ function… which creates certain > confusion with debugging scope. > > > > Was it designed that way, or am I missing something here… > > > > Thanks a lot. > > > > Sergei > > > > > > > > --- > > Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted > by The Linux Foundation > > >-- -- Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160415/4e9d2def/attachment.html>
Will that take care of creating a properly named debug scope? (“Properly” in this context == named after cloned destination…) --- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation From: Peter Collingbourne [mailto:peter at pcc.me.uk] Sent: Friday, April 15, 2016 12:03 PM To: Sergei Larin <slarin at codeaurora.org>; aprantl at apple.com Cc: Teresa Johnson <tejohnson at google.com>; llvm-dev <llvm-dev at lists.llvm.org> Subject: Re: Can DISubprogram be renamed? I'd actually like to remove that functionality, as it is unused. See http://reviews.llvm.org/D18628 Adrian's change r266446 I think obsoletes that patch or at least makes it a lot simpler. Peter On Fri, Apr 15, 2016 at 9:50 AM, Sergei Larin <slarin at codeaurora.org <mailto:slarin at codeaurora.org> > wrote: Peter, I am afraid I am missing a big picture with debug info cloning. Certainly after your patch (and possibly in some cases earlier): Cloning: Reduce complexity of debug info cloning and fix correctness issue. Commit r260791 contained an error in that it would introduce a cross-module reference in the old module. It also introduced O(N^2) complexity in the module cloner by requiring the entire module to be visited for each function. Fix both of these problems by avoiding use of the CloneDebugInfoMetadata function (which is only designed to do intra-module cloning) and cloning function-attached metadata in the same way that we clone all other metadata. Differential Revision: http://reviews.llvm.org/D18583 During CloneFunctionInto we seem to create a new DISubprogram which still carries the name of the _original_ function… which creates certain confusion with debugging scope. Was it designed that way, or am I missing something here… Thanks a lot. Sergei --- Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation -- -- Peter -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20160415/6ea482f3/attachment.html>
Reasonably Related Threads
- Dangling debug value or bug in argument elimination pass?
- Dangling debug value or bug in argument elimination pass?
- [LLVM][DISubprogram][LL format updation query] Question regarding moving DISubprogram DIFlags to DISPFlag.
- [LLVM][DISubprogram][LL format updation query] Question regarding moving DISubprogram DIFlags to DISPFlag.
- Why does a DISubprogram need to be distinct?