2014-05-25 15:38:52 +00:00
; RUN: llc -mtriple=x86_64-linux < %s -filetype=obj | llvm-dwarfdump -debug-dump=info - | FileCheck %s
2011-11-12 01:57:54 +00:00
; test that we add DW_AT_inline even when we only have concrete out of line
; instances.
; first check that we have a TAG_subprogram at a given offset and it has
; AT_inline.
2014-03-07 01:19:31 +00:00
; CHECK: DW_TAG_class_type
; CHECK: DW_TAG_subprogram
2014-10-06 03:36:31 +00:00
; CHECK: DW_TAG_subprogram
2015-03-10 22:44:45 +00:00
; CHECK: DW_AT_linkage_name {{.*}} "_ZN12nsAutoRefCntaSEi"
2014-05-19 21:54:31 +00:00
2014-05-21 18:04:33 +00:00
; CHECK: DW_TAG_class_type
2014-10-06 03:36:31 +00:00
; CHECK: DW_TAG_subprogram
2015-03-10 22:44:45 +00:00
; CHECK: DW_AT_linkage_name {{.*}} "_ZN17nsAutoRefCnt7ReleaseEv"
2014-10-06 03:36:31 +00:00
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_name {{.*}} "~nsAutoRefCnt"
2014-05-21 18:04:33 +00:00
2014-10-06 03:36:31 +00:00
; CHECK: DW_TAG_subprogram
2014-05-27 18:37:48 +00:00
; CHECK-NEXT: DW_AT_{{.*}}linkage_name {{.*}}D2
2014-10-06 03:36:31 +00:00
; CHECK-NEXT: DW_AT_specification {{.*}} "~nsAutoRefCnt"
2014-05-27 18:37:55 +00:00
; CHECK-NEXT: DW_AT_inline
2014-05-27 18:37:48 +00:00
; CHECK-NOT: DW_AT
; CHECK: DW_TAG
2014-10-06 03:36:31 +00:00
; CHECK: DW_TAG_subprogram
2014-05-27 18:37:48 +00:00
; CHECK-NEXT: DW_AT_{{.*}}linkage_name {{.*}}D1
2014-10-06 03:36:31 +00:00
; CHECK-NEXT: DW_AT_specification {{.*}} "~nsAutoRefCnt"
2014-05-27 18:37:55 +00:00
; CHECK-NEXT: DW_AT_inline
2014-05-27 18:37:48 +00:00
; CHECK-NOT: DW_AT
; CHECK: [[D1_THIS_ABS:.*]]: DW_TAG_formal_parameter
2014-10-06 03:36:31 +00:00
; CHECK: DW_TAG_subprogram
; CHECK: DW_AT_specification {{.*}} "_ZN17nsAutoRefCnt7ReleaseEv"
2014-05-19 21:54:31 +00:00
; CHECK: DW_TAG_formal_parameter
; CHECK-NOT: NULL
; CHECK-NOT: DW_TAG
; CHECK: DW_TAG_inlined_subroutine
2014-10-06 03:36:31 +00:00
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN12nsAutoRefCntaSEi"
2014-05-19 21:54:31 +00:00
; CHECK-NOT: NULL
; CHECK-NOT: DW_TAG
; CHECK: DW_TAG_inlined_subroutine
2014-10-06 03:36:31 +00:00
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD1Ev"
2014-05-19 21:54:31 +00:00
; CHECK-NOT: NULL
; CHECK-NOT: DW_TAG
; CHECK: DW_TAG_inlined_subroutine
2014-10-06 03:36:31 +00:00
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD2Ev"
2011-11-12 01:57:54 +00:00
; and then that a TAG_subprogram refers to it with AT_abstract_origin.
2014-03-07 01:19:31 +00:00
; CHECK: DW_TAG_subprogram
2014-05-27 18:37:55 +00:00
; CHECK-NOT: DW_TAG
2014-10-06 03:36:31 +00:00
; CHECK: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD1Ev"
2014-05-19 21:54:31 +00:00
; CHECK: DW_TAG_formal_parameter
2014-05-27 18:37:55 +00:00
; CHECK-NOT: DW_TAG
2014-10-10 15:51:02 +00:00
; CHECK: DW_AT_abstract_origin {{.*}} {[[D1_THIS_ABS]]} "this"
2014-05-19 21:54:31 +00:00
; CHECK: DW_TAG_inlined_subroutine
2014-10-06 03:36:31 +00:00
; CHECK-NEXT: DW_AT_abstract_origin {{.*}} "_ZN17nsAutoRefCntD2Ev"
2014-05-19 21:54:31 +00:00
2011-11-12 01:57:54 +00:00
define i32 @_ZN17nsAutoRefCnt7ReleaseEv ( ) {
entry:
store i32 1 , i32 * null , align 4 , !dbg !50
tail call void @_Z8moz_freePv ( i8 * null ) nounwind , !dbg !54
ret i32 0
}
define void @_ZN17nsAutoRefCntD1Ev ( ) {
entry:
tail call void @_Z8moz_freePv ( i8 * null ) nounwind , !dbg !57
ret void
}
declare void @_Z8moz_freePv ( i8 * )
!llvm.dbg.cu = ! { !0 }
2013-11-22 21:49:45 +00:00
!llvm.module.flags = ! { !60 }
2011-11-12 01:57:54 +00:00
2015-03-03 17:24:31 +00:00
!0 = !MDCompileUnit ( language: D W _ L A N G _ C _ p l u s _ p l u s , producer: "clang version 3.1 ()" , isOptimized: true , emissionKind: 0 , file: !59 , enums: !1 , retainedTypes: !1 , subprograms: !3 , globals: !47 , imports: !1 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!1 = ! { }
!3 = ! { !5 , !23 , !27 , !31 }
2015-03-03 17:24:31 +00:00
!5 = !MDSubprogram ( name: "Release" , linkageName: "_ZN17nsAutoRefCnt7ReleaseEv" , line: 14 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 14 , file: !6 , scope: null , type: !7 , function: i32 ( ) * @_ZN17nsAutoRefCnt7ReleaseEv , declaration: !12 , variables: !20 )
!6 = !MDFile ( filename: "nsAutoRefCnt.ii" , directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/netwerk/base/src" )
!7 = !MDSubroutineType ( types: !8 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!8 = ! { !9 , !10 }
2015-03-03 17:24:31 +00:00
!9 = !MDBasicType ( tag: D W _ T A G _ b a s e _ type , name: "int" , size: 32 , align: 32 , encoding: D W _ A T E _ s i g n e d )
!10 = !MDDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , size: 64 , align: 64 , flags: D I F l a g A r t i f i c i a l , baseType: !11 )
!11 = !MDCompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "nsAutoRefCnt" , line: 10 , flags: D I F l a g F w d D e c l , file: !59 )
!12 = !MDSubprogram ( name: "Release" , linkageName: "_ZN17nsAutoRefCnt7ReleaseEv" , line: 11 , isLocal: false , isDefinition: false , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 11 , file: !6 , scope: !13 , type: !7 , variables: !18 )
!13 = !MDCompositeType ( tag: D W _ T A G _ c l a s s _ type , name: "nsAutoRefCnt" , line: 10 , size: 8 , align: 8 , file: !59 , elements: !14 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!14 = ! { !12 , !15 }
2015-03-03 17:24:31 +00:00
!15 = !MDSubprogram ( name: "~nsAutoRefCnt" , line: 12 , isLocal: false , isDefinition: false , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 12 , file: !6 , scope: !13 , type: !16 , variables: !18 )
!16 = !MDSubroutineType ( types: !17 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!17 = ! { null , !10 }
!18 = ! { }
!20 = ! { !22 }
2015-03-03 17:24:31 +00:00
!22 = !MDLocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "this" , line: 14 , arg: 1 , flags: D I F l a g A r t i f i c i a l , scope: !5 , file: !6 , type: !10 )
!23 = !MDSubprogram ( name: "~nsAutoRefCnt" , linkageName: "_ZN17nsAutoRefCntD1Ev" , line: 18 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 18 , file: !6 , scope: null , type: !16 , function: void ( ) * @_ZN17nsAutoRefCntD1Ev , declaration: !15 , variables: !24 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!24 = ! { !26 }
2015-03-03 17:24:31 +00:00
!26 = !MDLocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "this" , line: 18 , arg: 1 , flags: D I F l a g A r t i f i c i a l , scope: !23 , file: !6 , type: !10 )
!27 = !MDSubprogram ( name: "~nsAutoRefCnt" , linkageName: "_ZN17nsAutoRefCntD2Ev" , line: 18 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 18 , file: !6 , scope: null , type: !16 , function: i32 * null , declaration: !15 , variables: !28 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!28 = ! { !30 }
2015-03-03 17:24:31 +00:00
!30 = !MDLocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "this" , line: 18 , arg: 1 , flags: D I F l a g A r t i f i c i a l , scope: !27 , file: !6 , type: !10 )
!31 = !MDSubprogram ( name: "operator=" , linkageName: "_ZN12nsAutoRefCntaSEi" , line: 4 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 4 , file: !6 , scope: null , type: !32 , declaration: !36 , variables: !43 )
!32 = !MDSubroutineType ( types: !33 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!33 = ! { !9 , !34 , !9 }
2015-03-03 17:24:31 +00:00
!34 = !MDDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , size: 64 , align: 64 , flags: D I F l a g A r t i f i c i a l , baseType: !35 )
!35 = !MDCompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "nsAutoRefCnt" , line: 2 , flags: D I F l a g F w d D e c l , file: !59 )
!36 = !MDSubprogram ( name: "operator=" , linkageName: "_ZN12nsAutoRefCntaSEi" , line: 4 , isLocal: false , isDefinition: false , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 4 , file: !6 , scope: !37 , type: !32 , variables: !18 )
!37 = !MDCompositeType ( tag: D W _ T A G _ c l a s s _ type , name: "nsAutoRefCnt" , line: 2 , size: 32 , align: 32 , file: !59 , elements: !38 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!38 = ! { !39 , !40 , !36 }
2015-03-03 17:24:31 +00:00
!39 = !MDDerivedType ( tag: D W _ T A G _ m e m b e r , name: "mValue" , line: 7 , size: 32 , align: 32 , file: !59 , scope: !37 , baseType: !9 )
!40 = !MDSubprogram ( name: "nsAutoRefCnt" , line: 3 , isLocal: false , isDefinition: false , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: true , scopeLine: 3 , file: !6 , scope: !37 , type: !41 , variables: !18 )
!41 = !MDSubroutineType ( types: !42 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!42 = ! { null , !34 }
!43 = ! { !45 , !46 }
2015-03-03 17:24:31 +00:00
!45 = !MDLocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "this" , line: 4 , arg: 1 , flags: D I F l a g A r t i f i c i a l , scope: !31 , file: !6 , type: !34 )
!46 = !MDLocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "aValue" , line: 4 , arg: 2 , scope: !31 , file: !6 , type: !9 )
IR: Make metadata typeless in assembly
Now that `Metadata` is typeless, reflect that in the assembly. These
are the matching assembly changes for the metadata/value split in
r223802.
- Only use the `metadata` type when referencing metadata from a call
intrinsic -- i.e., only when it's used as a `Value`.
- Stop pretending that `ValueAsMetadata` is wrapped in an `MDNode`
when referencing it from call intrinsics.
So, assembly like this:
define @foo(i32 %v) {
call void @llvm.foo(metadata !{i32 %v}, metadata !0)
call void @llvm.foo(metadata !{i32 7}, metadata !0)
call void @llvm.foo(metadata !1, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{metadata !3}, metadata !0)
ret void, !bar !2
}
!0 = metadata !{metadata !2}
!1 = metadata !{i32* @global}
!2 = metadata !{metadata !3}
!3 = metadata !{}
turns into this:
define @foo(i32 %v) {
call void @llvm.foo(metadata i32 %v, metadata !0)
call void @llvm.foo(metadata i32 7, metadata !0)
call void @llvm.foo(metadata i32* @global, metadata !0)
call void @llvm.foo(metadata !3, metadata !0)
call void @llvm.foo(metadata !{!3}, metadata !0)
ret void, !bar !2
}
!0 = !{!2}
!1 = !{i32* @global}
!2 = !{!3}
!3 = !{}
I wrote an upgrade script that handled almost all of the tests in llvm
and many of the tests in cfe (even handling many `CHECK` lines). I've
attached it (or will attach it in a moment if you're speedy) to PR21532
to help everyone update their out-of-tree testcases.
This is part of PR21532.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@224257 91177308-0d34-0410-b5e6-96231b3b80d8
2014-12-15 19:07:53 +00:00
!47 = ! { !49 }
2015-03-03 17:24:31 +00:00
!49 = !MDGlobalVariable ( name: "mRefCnt" , line: 9 , isLocal: false , isDefinition: true , scope: null , file: !6 , type: !37 , variable: i32 * null )
2015-01-14 22:27:36 +00:00
!50 = !MDLocation ( line: 5 , column: 5 , scope: !51 , inlinedAt: !52 )
2015-03-03 17:24:31 +00:00
!51 = distinct !MDLexicalBlock ( line: 4 , column: 29 , file: !6 , scope: !31 )
2015-01-14 22:27:36 +00:00
!52 = !MDLocation ( line: 15 , scope: !53 )
2015-03-03 17:24:31 +00:00
!53 = distinct !MDLexicalBlock ( line: 14 , column: 34 , file: !6 , scope: !5 )
2015-01-14 22:27:36 +00:00
!54 = !MDLocation ( line: 19 , column: 3 , scope: !55 , inlinedAt: !56 )
2015-03-03 17:24:31 +00:00
!55 = distinct !MDLexicalBlock ( line: 18 , column: 41 , file: !6 , scope: !27 )
2015-01-14 22:27:36 +00:00
!56 = !MDLocation ( line: 18 , column: 41 , scope: !23 , inlinedAt: !52 )
!57 = !MDLocation ( line: 19 , column: 3 , scope: !55 , inlinedAt: !58 )
!58 = !MDLocation ( line: 18 , column: 41 , scope: !23 )
2015-03-03 17:24:31 +00:00
!59 = !MDFile ( filename: "nsAutoRefCnt.ii" , directory: "/Users/espindola/mozilla-central/obj-x86_64-apple-darwin11.2.0/netwerk/base/src" )
!60 = ! { i32 1 , !"Debug Info Version" , i32 3 }