Duncan P. N. Exon Smith
2014-Oct-02 22:48 UTC
[LLVMdev] How do I update Ocaml debug info? (was Re: [llvm] r218914 - DI: Fold constant arguments into a single MDString)
-llvm-commits, +llvmdev> On Oct 2, 2014, at 2:57 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > > Author: dexonsmith > Date: Thu Oct 2 16:56:57 2014 > New Revision: 218914 > > URL: http://llvm.org/viewvc/llvm-project?rev=218914&view=rev > Log: > DI: Fold constant arguments into a single MDString > > This patch addresses the first stage of PR17891 by folding constant > arguments together into a single MDString. Integers are stringified and > a `\0` character is used as a separator. > > Part of PR17891. > > Note: I've attached my testcases upgrade scripts to the PR. If I've > just broken your out-of-tree testcases, they might help. >Among other things, this commit broke the Ocaml debug info test [1]. It's not obvious to me how to fix it (I don't speak Ocaml). Anyone know what to do? (Is it reasonable for me to just XFAIL it, file a PR, and move on?) [1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/11579
Duncan P. N. Exon Smith
2014-Oct-02 23:16 UTC
[LLVMdev] How do I update Ocaml debug info? (was Re: [llvm] r218914 - DI: Fold constant arguments into a single MDString)
+whitequark> On Oct 2, 2014, at 3:48 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: > > -llvm-commits, +llvmdev > >> On Oct 2, 2014, at 2:57 PM, Duncan P. N. Exon Smith <dexonsmith at apple.com> wrote: >> >> Author: dexonsmith >> Date: Thu Oct 2 16:56:57 2014 >> New Revision: 218914 >> >> URL: http://llvm.org/viewvc/llvm-project?rev=218914&view=rev >> Log: >> DI: Fold constant arguments into a single MDString >> >> This patch addresses the first stage of PR17891 by folding constant >> arguments together into a single MDString. Integers are stringified and >> a `\0` character is used as a separator. >> >> Part of PR17891. >> >> Note: I've attached my testcases upgrade scripts to the PR. If I've >> just broken your out-of-tree testcases, they might help. >> > > Among other things, this commit broke the Ocaml debug info test [1]. > It's not obvious to me how to fix it (I don't speak Ocaml). Anyone know > what to do? (Is it reasonable for me to just XFAIL it, file a PR, and > move on?) > > [1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/11579I have a guess (patch below), which I'll roll into my next attempt once I've sorted out the other buildbot failures. Note that r218914 had the first hunk, but missed the second. In the meantime, if anyone that speaks Ocaml can take a look, I'd appreciate it. diff --git a/test/Bindings/Ocaml/vmcore.ml b/test/Bindings/Ocaml/vmcore.ml index ea91294..da09cc7 100644 --- a/test/Bindings/Ocaml/vmcore.ml +++ b/test/Bindings/Ocaml/vmcore.ml @@ -1358,7 +1358,7 @@ let test_builder () (* End-of-file checks for things like metdata and attributes. * CHECK: attributes #0 = {{.*}}uwtable{{.*}} * CHECK: !llvm.module.flags = !{!0} - * CHECK: !0 = metadata !{i32 1, metadata !"Debug Info Version", i32 1} + * CHECK: !0 = metadata !{i32 1, metadata !"Debug Info Version", i32 2} * CHECK: !1 = metadata !{i32 1, metadata !"metadata test"} * CHECK: !2 = metadata !{i32 2, i32 3, metadata !3, metadata !3} *) @@ -1070,7 +1070,8 @@ let test_builder () (* !llvm.module.flags is emitted at EOF. *) let n1 = const_int i32_type 1 in let n2 = mdstring context "Debug Info Version" in - let md = mdnode context [| n1; n2; n1 |] in + let n3 = const_int i32_type 2 in + let md = mdnode context [| n1; n2; n3 |] in add_named_metadata_operand m "llvm.module.flags" md; insist ((get_named_metadata m "llvm.module.flags") = [| md |]) -------------- next part -------------- A non-text attachment was scrubbed... Name: vmcore.ml.patch Type: application/octet-stream Size: 1098 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20141002/5eee9426/attachment.obj>
Reid Kleckner
2014-Oct-02 23:17 UTC
[LLVMdev] How do I update Ocaml debug info? (was Re: [llvm] r218914 - DI: Fold constant arguments into a single MDString)
Better to do something like CHECKX, since the rest of OCaml IR generation should still work, and it's primarily tested in that one file. I think it's reasonable to file a PR about it and temporarily regress OCaml debug info generation. It would be good if line information worked, though. On Thu, Oct 2, 2014 at 3:48 PM, Duncan P. N. Exon Smith < dexonsmith at apple.com> wrote:> -llvm-commits, +llvmdev > > > On Oct 2, 2014, at 2:57 PM, Duncan P. N. Exon Smith < > dexonsmith at apple.com> wrote: > > > > Author: dexonsmith > > Date: Thu Oct 2 16:56:57 2014 > > New Revision: 218914 > > > > URL: http://llvm.org/viewvc/llvm-project?rev=218914&view=rev > > Log: > > DI: Fold constant arguments into a single MDString > > > > This patch addresses the first stage of PR17891 by folding constant > > arguments together into a single MDString. Integers are stringified and > > a `\0` character is used as a separator. > > > > Part of PR17891. > > > > Note: I've attached my testcases upgrade scripts to the PR. If I've > > just broken your out-of-tree testcases, they might help. > > > > Among other things, this commit broke the Ocaml debug info test [1]. > It's not obvious to me how to fix it (I don't speak Ocaml). Anyone know > what to do? (Is it reasonable for me to just XFAIL it, file a PR, and > move on?) > > [1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/11579 > > _______________________________________________ > 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/20141002/26b08028/attachment.html>
Peter Zotov
2014-Oct-02 23:17 UTC
[LLVMdev] How do I update Ocaml debug info? (was Re: [llvm] r218914 - DI: Fold constant arguments into a single MDString)
On 2014-10-03 03:16, Duncan P. N. Exon Smith wrote:> +whitequark > >> On Oct 2, 2014, at 3:48 PM, Duncan P. N. Exon Smith >> <dexonsmith at apple.com> wrote: >> >> -llvm-commits, +llvmdev >> >>> On Oct 2, 2014, at 2:57 PM, Duncan P. N. Exon Smith >>> <dexonsmith at apple.com> wrote: >>> >>> Author: dexonsmith >>> Date: Thu Oct 2 16:56:57 2014 >>> New Revision: 218914 >>> >>> URL: http://llvm.org/viewvc/llvm-project?rev=218914&view=rev >>> Log: >>> DI: Fold constant arguments into a single MDString >>> >>> This patch addresses the first stage of PR17891 by folding constant >>> arguments together into a single MDString. Integers are stringified >>> and >>> a `\0` character is used as a separator. >>> >>> Part of PR17891. >>> >>> Note: I've attached my testcases upgrade scripts to the PR. If I've >>> just broken your out-of-tree testcases, they might help. >>> >> >> Among other things, this commit broke the Ocaml debug info test [1]. >> It's not obvious to me how to fix it (I don't speak Ocaml). Anyone >> know >> what to do? (Is it reasonable for me to just XFAIL it, file a PR, and >> move on?) >> >> [1]: http://lab.llvm.org:8011/builders/llvm-hexagon-elf/builds/11579 > > I have a guess (patch below), which I'll roll into my next attempt once > I've sorted out the other buildbot failures. Note that r218914 had the > first hunk, but missed the second. > > In the meantime, if anyone that speaks Ocaml can take a look, I'd > appreciate it.LGTM.> > diff --git a/test/Bindings/Ocaml/vmcore.ml > b/test/Bindings/Ocaml/vmcore.ml > index ea91294..da09cc7 100644 > --- a/test/Bindings/Ocaml/vmcore.ml > +++ b/test/Bindings/Ocaml/vmcore.ml > @@ -1358,7 +1358,7 @@ let test_builder () > (* End-of-file checks for things like metdata and attributes. > * CHECK: attributes #0 = {{.*}}uwtable{{.*}} > * CHECK: !llvm.module.flags = !{!0} > - * CHECK: !0 = metadata !{i32 1, metadata !"Debug Info Version", i32 > 1} > + * CHECK: !0 = metadata !{i32 1, metadata !"Debug Info Version", i32 > 2} > * CHECK: !1 = metadata !{i32 1, metadata !"metadata test"} > * CHECK: !2 = metadata !{i32 2, i32 3, metadata !3, metadata !3} > *) > @@ -1070,7 +1070,8 @@ let test_builder () > (* !llvm.module.flags is emitted at EOF. *) > let n1 = const_int i32_type 1 in > let n2 = mdstring context "Debug Info Version" in > - let md = mdnode context [| n1; n2; n1 |] in > + let n3 = const_int i32_type 2 in > + let md = mdnode context [| n1; n2; n3 |] in > add_named_metadata_operand m "llvm.module.flags" md; > > insist ((get_named_metadata m "llvm.module.flags") = [| md |])-- Peter Zotov
Apparently Analagous Threads
- [LLVMdev] Debug info: type uniquing for C++ and the status on building clang with "-flto -g"
- [LLVMdev] Debug info: type uniquing for C++ and the status on building clang with "-flto -g"
- [LLVMdev] [RFC] Less memory and greater maintainability for debug info IR
- [LLVMdev] Proposal: extended MDString syntax
- [LLVMdev] Proposal: extended MDString syntax