[llvm] r264990 - [DebugInfo] Subprograms should belong to a CU.

Duncan Exon Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 31 06:57:48 PDT 2016



> On Mar 30, 2016, at 9:47 PM, Davide Italiano <davide at freebsd.org> wrote:
> 
> On Wed, Mar 30, 2016 at 8:40 PM, Davide Italiano via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>> Author: davide
>> Date: Wed Mar 30 22:40:07 2016
>> New Revision: 264990
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=264990&view=rev
>> Log:
>> [DebugInfo] Subprograms should belong to a CU.

On my phone so it's hard to check:   You're only changing this for subprograms that have "isDefinition: true", right?   (Declarations are part of the type hierarchy and shouldn't be in any compile unit's list of subprograms:.)

>> 
>> Start fixing tests accordingly. There are still
>> about 35 failures before we can enable this check
>> in the IR verifier.
>> 
>> Modified:
>>    llvm/trunk/test/Bitcode/debug-loc-again.ll
>>    llvm/trunk/test/CodeGen/MIR/X86/invalid-metadata-node-type.mir
>>    llvm/trunk/test/CodeGen/X86/StackColoring-dbg.ll
>>    llvm/trunk/test/CodeGen/X86/machine-trace-metrics-crash.ll
>>    llvm/trunk/test/DebugInfo/Generic/2010-03-19-DbgDeclare.ll
>>    llvm/trunk/test/Transforms/DeadArgElim/2010-04-30-DbgInfo.ll
>>    llvm/trunk/test/Transforms/Mem2Reg/ConvertDebugInfo2.ll
>>    llvm/trunk/test/Transforms/SimplifyCFG/basictest.ll
>>    llvm/trunk/test/Transforms/Util/split-bit-piece.ll
>>    llvm/trunk/test/Transforms/Util/store-first-op.ll
> 
> This first pass was more or less trivial, but now all the tests left
> have no CU defined.
> I tried to port one random test, would be glad if you can take a look
> before I keep going.

LGTM!   Thanks for doing this. 

> Also, some of them can't be (alas) easily fixed (SampleProfile) until
> Adrian lands his fix.
> 
> Thanks!
> 
> Index: test/Assembler/dilocation.ll
> ===================================================================
> --- test/Assembler/dilocation.ll (revision 264875)
> +++ test/Assembler/dilocation.ll (working copy)
> @@ -4,6 +4,9 @@
> ; CHECK: !named = !{!0, !1, !1, !2, !2, !3, !3, !4}
> !named = !{!0, !1, !2, !3, !4, !5, !6, !7}
> 
> +!llvm.module.flags = !{!10}
> +!llvm.dbg.cu = !{!8}
> +
> ; CHECK: !0 = distinct !DISubprogram(
> !0 = distinct !DISubprogram()
> 
> @@ -21,3 +24,11 @@
> 
> ; CHECK-NEXT: !4 = !DILocation(line: 4294967295, column: 65535, scope: !0)
> !7 = !DILocation(line: 4294967295, column: 65535, scope: !0)
> +
> +!8 = distinct !DICompileUnit(language: DW_LANG_C99, producer: "clang",
> +                             file: !9,
> +                             isOptimized: true, flags: "-O2",
> +                             splitDebugFilename: "abc.debug", emissionKind: 3,
> +                             subprograms: !{!0})
> +!9 = !DIFile(filename: "path/to/file", directory: "/path/to/dir")
> +!10 = !{i32 2, !"Debug Info Version", i32 3}
> 
> 
> --
> Davide
> 
> "There are no solved problems; there are only problems that are more
> or less solved" -- Henri Poincare


More information about the llvm-commits mailing list