Duncan P. N. Exon Smith
2015-Jan-13 04:30 UTC
[LLVMdev] [RFC] First-class debug info IR: MDLocation (redux)
After splitting `Metadata` apart from `Value`, I'm finally back to the first step [1] of representing debug info more directly in IR [2]: `MDLocation`. [1]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-October/078173.html "First-class debug info IR: MDLocation" [2]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-October/077715.html "Less memory and greater maintainability for debug info IR" I've attached two patches which are both essentially commit-ready (just missing LangRef update, AFAIK), although they just add the class and assembly/bitcode support. Once it's in tree, I'll move it into place underneath `DebugLoc` and `DILocation` and update the world of testcases, publish a script, and so forth. Assembly syntax ============== I've changed the assembly syntax a little since my previous proposal [1], but I kept the fundamentals the same: - Fields use key/value pairs and can be specified in any order. - No types (unless you're referencing a `Value`). - Some fields are required (in this case, 'scope:'). - Unspecified fields get sane default values. Old syntax: !6 = metadata MDLocation(line: 43, column: 7, scope: !4) Now it's: !6 = !MDLocation(line: 43, column: 7, scope: !4) Here's why: - Dropped 'metadata' since `Metadata` is now typeless \O/. - Added a '!' since it makes the parser simpler (no changes to the lexer, since we can unambiguously reuse the `MetadataVar` token), and follows the rule that "All metadata are identified in syntax by a[n] exclamation point" [3]. (If people are opposed to the extra '!' I can update this sentence instead, but it seems like a handy mnemonic to maintain.) [3]: http://llvm.org/docs/LangRef.html#metadata Where this is heading ==================== See my previous post [1] ;). -------------- next part -------------- A non-text attachment was scrubbed... Name: 0001-IR-Add-MDLocation-class.patch Type: application/octet-stream Size: 14059 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150112/bceccecd/attachment.obj> -------------- next part -------------- A non-text attachment was scrubbed... Name: 0002-AsmParser-Bitcode-Add-support-for-MDLocation.patch Type: application/octet-stream Size: 19200 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150112/bceccecd/attachment-0001.obj>
Robinson, Paul
2015-Jan-13 05:50 UTC
[LLVMdev] [RFC] First-class debug info IR: MDLocation (redux)
Would you mind terribly waiting a week, until after 3.6 is forked? We're barely caught up with the last big metadata syntax change. Thanks, --paulr From: llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] On Behalf Of Duncan P. N. Exon Smith Sent: Monday, January 12, 2015 8:30 PM To: LLVM Developers Mailing List Subject: [LLVMdev] [RFC] First-class debug info IR: MDLocation (redux) After splitting `Metadata` apart from `Value`, I'm finally back to the first step [1] of representing debug info more directly in IR [2]: `MDLocation`. [1]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-October/078173.html "First-class debug info IR: MDLocation" [2]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-October/077715.html "Less memory and greater maintainability for debug info IR" I've attached two patches which are both essentially commit-ready (just missing LangRef update, AFAIK), although they just add the class and assembly/bitcode support. Once it's in tree, I'll move it into place underneath `DebugLoc` and `DILocation` and update the world of testcases, publish a script, and so forth. Assembly syntax ============== I've changed the assembly syntax a little since my previous proposal [1], but I kept the fundamentals the same: - Fields use key/value pairs and can be specified in any order. - No types (unless you're referencing a `Value`). - Some fields are required (in this case, 'scope:'). - Unspecified fields get sane default values. Old syntax: !6 = metadata MDLocation(line: 43, column: 7, scope: !4) Now it's: !6 = !MDLocation(line: 43, column: 7, scope: !4) Here's why: - Dropped 'metadata' since `Metadata` is now typeless \O/. - Added a '!' since it makes the parser simpler (no changes to the lexer, since we can unambiguously reuse the `MetadataVar` token), and follows the rule that "All metadata are identified in syntax by a[n] exclamation point" [3]. (If people are opposed to the extra '!' I can update this sentence instead, but it seems like a handy mnemonic to maintain.) [3]: http://llvm.org/docs/LangRef.html#metadata Where this is heading ==================== See my previous post [1] ;). _______________________________________________ LLVM Developers mailing list LLVMdev at cs.uiuc.edu<mailto:LLVMdev at cs.uiuc.edu> http://llvm.cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150113/6185285e/attachment.html>
Eric Christopher
2015-Jan-13 18:13 UTC
[LLVMdev] [RFC] First-class debug info IR: MDLocation (redux)
This LGTM. I like the new syntax. Feel free to commit as soon as you have the LangRef changes handy. -eric On Mon Jan 12 2015 at 8:34:18 PM Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote:> After splitting `Metadata` apart from `Value`, I'm finally back to the > first step [1] of representing debug info more directly in IR [2]: > `MDLocation`. > > [1]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-October/078173.html > "First-class debug info IR: MDLocation" > [2]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-October/077715.html > "Less memory and greater maintainability for debug info IR" > > I've attached two patches which are both essentially commit-ready (just > missing LangRef update, AFAIK), although they just add the class and > assembly/bitcode support. Once it's in tree, I'll move it into place > underneath `DebugLoc` and `DILocation` and update the world of > testcases, publish a script, and so forth. > > Assembly syntax > ==============> > I've changed the assembly syntax a little since my previous proposal > [1], but I kept the fundamentals the same: > > - Fields use key/value pairs and can be specified in any order. > - No types (unless you're referencing a `Value`). > - Some fields are required (in this case, 'scope:'). > - Unspecified fields get sane default values. > > Old syntax: > > !6 = metadata MDLocation(line: 43, column: 7, scope: !4) > > Now it's: > > !6 = !MDLocation(line: 43, column: 7, scope: !4) > > Here's why: > > - Dropped 'metadata' since `Metadata` is now typeless \O/. > > - Added a '!' since it makes the parser simpler (no changes to the > lexer, since we can unambiguously reuse the `MetadataVar` token), > and follows the rule that "All metadata are identified in syntax by > a[n] exclamation point" [3]. (If people are opposed to the extra > '!' I can update this sentence instead, but it seems like a handy > mnemonic to maintain.) > > [3]: http://llvm.org/docs/LangRef.html#metadata > > Where this is heading > ====================> > See my previous post [1] ;). > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150113/7252b4c4/attachment.html>
Eric Christopher
2015-Jan-13 18:14 UTC
[LLVMdev] [RFC] First-class debug info IR: MDLocation (redux)
Hi Paul, I'm not sure I see any reason to wait until after 3.6. More changes are incoming and it's better to get them over with sooner rather than spread out the pain. Thanks! -eric On Mon Jan 12 2015 at 9:52:48 PM Robinson, Paul < Paul_Robinson at playstation.sony.com> wrote:> Would you mind terribly waiting a week, until after 3.6 is forked? > > We're barely caught up with the last big metadata syntax change. > > Thanks, > > --paulr > > > > *From:* llvmdev-bounces at cs.uiuc.edu [mailto:llvmdev-bounces at cs.uiuc.edu] *On > Behalf Of *Duncan P. N. Exon Smith > *Sent:* Monday, January 12, 2015 8:30 PM > *To:* LLVM Developers Mailing List > *Subject:* [LLVMdev] [RFC] First-class debug info IR: MDLocation (redux) > > > > After splitting `Metadata` apart from `Value`, I'm finally back to the > first step [1] of representing debug info more directly in IR [2]: > `MDLocation`. > > [1]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-October/078173.html > "First-class debug info IR: MDLocation" > [2]: http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-October/077715.html > "Less memory and greater maintainability for debug info IR" > > I've attached two patches which are both essentially commit-ready (just > missing LangRef update, AFAIK), although they just add the class and > assembly/bitcode support. Once it's in tree, I'll move it into place > underneath `DebugLoc` and `DILocation` and update the world of > testcases, publish a script, and so forth. > > Assembly syntax > ==============> > I've changed the assembly syntax a little since my previous proposal > [1], but I kept the fundamentals the same: > > - Fields use key/value pairs and can be specified in any order. > - No types (unless you're referencing a `Value`). > - Some fields are required (in this case, 'scope:'). > - Unspecified fields get sane default values. > > Old syntax: > > !6 = metadata MDLocation(line: 43, column: 7, scope: !4) > > Now it's: > > !6 = !MDLocation(line: 43, column: 7, scope: !4) > > Here's why: > > - Dropped 'metadata' since `Metadata` is now typeless \O/. > > - Added a '!' since it makes the parser simpler (no changes to the > lexer, since we can unambiguously reuse the `MetadataVar` token), > and follows the rule that "All metadata are identified in syntax by > a[n] exclamation point" [3]. (If people are opposed to the extra > '!' I can update this sentence instead, but it seems like a handy > mnemonic to maintain.) > > [3]: http://llvm.org/docs/LangRef.html#metadata > > Where this is heading > ====================> > See my previous post [1] ;). > > _______________________________________________ > 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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150113/4526e2cd/attachment.html>
Maybe Matching Threads
- [LLVMdev] [RFC] First-class debug info IR: MDLocation (redux)
- [LLVMdev] [RFC] First-class debug info IR: MDLocation (redux)
- [LLVMdev] [RFC] First-class debug info IR: MDLocation (redux)
- [LLVMdev] First-class debug info IR: MDLocation
- [LLVMdev] Should I commit "IR: Move MDLocation into place" before or after 3.6 branch?