2013-09-06 18:46:00 +00:00
; REQUIRES: object-emission
2014-01-30 01:39:17 +00:00
; RUN: %llc_dwarf -filetype=obj -O0 < %s > %t
2013-09-06 18:46:00 +00:00
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
; CHECK: [[TYPE:.*]]: DW_TAG_structure_type
2013-10-10 18:13:17 +00:00
; Make sure we correctly handle containing type of a struct being a type identifier.
2013-09-06 18:46:00 +00:00
; CHECK-NEXT: DW_AT_containing_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE]]})
2013-10-10 18:13:17 +00:00
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "C")
2013-10-10 18:40:01 +00:00
; Make sure we correctly handle context of a subprogram being a type identifier.
2013-09-07 00:04:05 +00:00
; CHECK: [[SP:.*]]: DW_TAG_subprogram
2013-10-10 18:40:01 +00:00
; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "foo")
2013-10-10 18:13:17 +00:00
; Make sure we correctly handle containing type of a subprogram being a type identifier.
2013-09-07 00:04:05 +00:00
; CHECK: DW_AT_containing_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE]]})
2013-10-10 18:40:01 +00:00
; CHECK: DW_TAG_formal_parameter
; CHECK: NULL
; CHECK: NULL
2013-10-08 22:56:31 +00:00
; CHECK: [[TYPE2:.*]]: DW_TAG_structure_type
2013-10-11 18:50:00 +00:00
; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "bar")
2013-10-08 23:49:38 +00:00
; CHECK: DW_TAG_structure_type
; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "D")
; CHECK: DW_TAG_member
; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "a")
2013-10-10 18:13:17 +00:00
; Make sure we correctly handle context of a struct being a type identifier.
2013-10-09 00:17:04 +00:00
; CHECK: DW_TAG_structure_type
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "Nested")
2013-10-09 18:10:55 +00:00
; CHECK: DW_TAG_structure_type
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "Nested2")
; CHECK-NEXT: DW_AT_declaration [DW_FORM_flag] (0x01)
2013-10-09 19:46:28 +00:00
; CHECK: DW_TAG_structure_type
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "virt<bar>")
2013-10-10 18:13:17 +00:00
; Make sure we correctly handle type of a template_type being a type identifier.
2013-10-09 19:46:28 +00:00
; CHECK: DW_TAG_template_type_parameter
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})
; CHECK-NEXT: DW_AT_name [DW_FORM_strp] {{.*}}= "T")
2013-10-10 18:13:17 +00:00
; Make sure we correctly handle derived-from of a typedef being a type identifier.
2013-10-08 23:49:38 +00:00
; CHECK: DW_TAG_typedef
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})
; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz2")
2013-10-10 18:13:17 +00:00
; Make sure we correctly handle derived-from of a pointer type being a type identifier.
2013-10-08 20:06:43 +00:00
; CHECK: DW_TAG_pointer_type
2013-10-09 19:46:28 +00:00
; CHECK: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE]]})
2013-10-08 22:56:31 +00:00
; CHECK: DW_TAG_typedef
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})
2013-10-08 23:49:38 +00:00
; CHECK: DW_AT_name [DW_FORM_strp] {{.*}}= "baz")
2013-10-10 18:13:17 +00:00
; Make sure we correctly handle derived-from of an array type being a type identifier.
2013-10-08 23:28:51 +00:00
; CHECK: DW_TAG_array_type
; CHECK-NEXT: DW_AT_type [DW_FORM_ref4] (cu + {{.*}} => {[[TYPE2]]})
2013-09-06 18:46:00 +00:00
; IR generated from clang -g with the following source:
; struct C {
; virtual void foo();
; };
; void C::foo() {
; }
2013-10-08 22:56:31 +00:00
;
; struct bar { };
; typedef bar baz;
2013-10-08 23:49:38 +00:00
; struct D {
; typedef bar baz2;
; static int a;
2013-10-09 00:17:04 +00:00
; struct Nested { };
2013-10-09 18:10:55 +00:00
; struct Nested2 { };
2013-10-09 19:46:28 +00:00
; template <typename T>
; struct virt {
; T* values;
; };
2013-10-08 23:49:38 +00:00
; };
2013-10-08 22:56:31 +00:00
; void test() {
; baz B;
2013-10-08 23:28:51 +00:00
; bar A[3];
2013-10-08 23:49:38 +00:00
; D::baz2 B2;
2013-10-09 00:17:04 +00:00
; D::Nested e;
2013-10-09 18:10:55 +00:00
; D::Nested2 *p;
2013-10-09 19:46:28 +00:00
; D::virt<bar> t;
2013-10-08 22:56:31 +00:00
; }
2013-09-06 18:46:00 +00:00
%struct.C = type { i32 ( . . . ) * * }
2013-10-08 22:56:31 +00:00
%struct.bar = type { i8 }
2013-10-09 00:17:04 +00:00
%"struct.D::Nested" = type { i8 }
2013-10-09 18:10:55 +00:00
%"struct.D::Nested2" = type { i8 }
2013-10-09 19:46:28 +00:00
%"struct.D::virt" = type { %struct.bar * }
2013-09-06 18:46:00 +00:00
@_ZTV1C = unnamed_addr constant [ 3 x i8 * ] [ i8 * null , i8 * bitcast ( { i8 * , i8 * } * @_ZTI1C to i8 * ) , i8 * bitcast ( void ( %struct.C * ) * @_ZN1C3fooEv to i8 * ) ]
@_ZTVN10__cxxabiv117__class_type_infoE = external global i8 *
@_ZTS1C = constant [ 3 x i8 ] c "1C\00"
2015-03-13 18:20:45 +00:00
@_ZTI1C = unnamed_addr constant { i8 * , i8 * } { i8 * bitcast ( i8 * * getelementptr inbounds ( i8 * , i8 * * @_ZTVN10__cxxabiv117__class_type_infoE , i64 2 ) to i8 * ) , i8 * getelementptr inbounds ( [ 3 x i8 ] , [ 3 x i8 ] * @_ZTS1C , i32 0 , i32 0 ) }
2013-09-06 18:46:00 +00:00
; Function Attrs: nounwind ssp uwtable
define void @_ZN1C3fooEv ( %struct.C * %this ) unnamed_addr #0 align 2 {
entry:
%this.addr = alloca %struct.C * , align 8
store %struct.C * %this , %struct.C * * %this.addr , align 8
2015-04-29 16:38:44 +00:00
call void @llvm.dbg.declare ( metadata %struct.C * * %this.addr , metadata !36 , metadata !DIExpression ( ) ) , !dbg !38
2015-02-27 21:17:42 +00:00
%this1 = load %struct.C * , %struct.C * * %this.addr
2013-10-09 19:46:28 +00:00
ret void , !dbg !39
2013-09-06 18:46:00 +00:00
}
; Function Attrs: nounwind readnone
Move the complex address expression out of DIVariable and into an extra
argument of the llvm.dbg.declare/llvm.dbg.value intrinsics.
Previously, DIVariable was a variable-length field that has an optional
reference to a Metadata array consisting of a variable number of
complex address expressions. In the case of OpPiece expressions this is
wasting a lot of storage in IR, because when an aggregate type is, e.g.,
SROA'd into all of its n individual members, the IR will contain n copies
of the DIVariable, all alike, only differing in the complex address
reference at the end.
By making the complex address into an extra argument of the
dbg.value/dbg.declare intrinsics, all of the pieces can reference the
same variable and the complex address expressions can be uniqued across
the CU, too.
Down the road, this will allow us to move other flags, such as
"indirection" out of the DIVariable, too.
The new intrinsics look like this:
declare void @llvm.dbg.declare(metadata %storage, metadata %var, metadata %expr)
declare void @llvm.dbg.value(metadata %storage, i64 %offset, metadata %var, metadata %expr)
This patch adds a new LLVM-local tag to DIExpressions, so we can detect
and pretty-print DIExpression metadata nodes.
What this patch doesn't do:
This patch does not touch the "Indirect" field in DIVariable; but moving
that into the expression would be a natural next step.
http://reviews.llvm.org/D4919
rdar://problem/17994491
Thanks to dblaikie and dexonsmith for reviewing this patch!
Note: I accidentally committed a bogus older version of this patch previously.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@218787 91177308-0d34-0410-b5e6-96231b3b80d8
2014-10-01 18:55:02 +00:00
declare void @llvm.dbg.declare ( metadata , metadata , metadata ) #1
2013-09-06 18:46:00 +00:00
2013-10-08 22:56:31 +00:00
; Function Attrs: nounwind ssp uwtable
define void @_Z4testv ( ) #0 {
entry:
%B = alloca %struct.bar , align 1
2013-10-08 23:28:51 +00:00
%A = alloca [ 3 x %struct.bar ] , align 1
2013-10-08 23:49:38 +00:00
%B2 = alloca %struct.bar , align 1
2013-10-09 00:17:04 +00:00
%e = alloca %"struct.D::Nested" , align 1
2013-10-09 18:10:55 +00:00
%p = alloca %"struct.D::Nested2" * , align 8
2013-10-09 19:46:28 +00:00
%t = alloca %"struct.D::virt" , align 8
2015-04-29 16:38:44 +00:00
call void @llvm.dbg.declare ( metadata %struct.bar * %B , metadata !40 , metadata !DIExpression ( ) ) , !dbg !42
call void @llvm.dbg.declare ( metadata [ 3 x %struct.bar ] * %A , metadata !43 , metadata !DIExpression ( ) ) , !dbg !47
call void @llvm.dbg.declare ( metadata %struct.bar * %B2 , metadata !48 , metadata !DIExpression ( ) ) , !dbg !50
call void @llvm.dbg.declare ( metadata %"struct.D::Nested" * %e , metadata !51 , metadata !DIExpression ( ) ) , !dbg !52
call void @llvm.dbg.declare ( metadata %"struct.D::Nested2" * * %p , metadata !53 , metadata !DIExpression ( ) ) , !dbg !55
call void @llvm.dbg.declare ( metadata %"struct.D::virt" * %t , metadata !56 , metadata !DIExpression ( ) ) , !dbg !57
2013-10-09 19:46:28 +00:00
ret void , !dbg !58
2013-10-08 22:56:31 +00:00
}
2013-09-06 18:46:00 +00:00
attributes #0 = { nounwind ssp uwtable "less-precise-fpmad" = "false" "no-frame-pointer-elim" = "true" "no-frame-pointer-elim-non-leaf" "no-infs-fp-math" = "false" "no-nans-fp-math" = "false" "stack-protector-buffer-size" = "8" "unsafe-fp-math" = "false" "use-soft-float" = "false" }
attributes #1 = { nounwind readnone }
!llvm.dbg.cu = ! { !0 }
2013-11-22 21:49:45 +00:00
!llvm.module.flags = ! { !35 , !59 }
2013-09-06 18:46:00 +00:00
2015-04-29 16:38:44 +00:00
!0 = !DICompileUnit ( language: D W _ L A N G _ C _ p l u s _ p l u s , producer: "clang version 3.4" , isOptimized: false , emissionKind: 0 , file: !1 , enums: !2 , retainedTypes: !3 , subprograms: !30 , globals: !2 , imports: !2 )
!1 = !DIFile ( filename: "tmp.cpp" , directory: "." )
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
!2 = ! { }
!3 = ! { !4 , !18 , !19 , !22 , !23 , !24 }
2015-04-29 16:38:44 +00:00
!4 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "C" , line: 1 , size: 64 , align: 64 , file: !1 , elements: !5 , vtableHolder: !"_ZTS1C" , identifier: "_ZTS1C" )
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
!5 = ! { !6 , !13 }
2015-04-29 16:38:44 +00:00
!6 = !DIDerivedType ( tag: D W _ T A G _ m e m b e r , name: "_vptr$C" , size: 64 , flags: D I F l a g A r t i f i c i a l , file: !1 , scope: !7 , baseType: !8 )
!7 = !DIFile ( filename: "tmp.cpp" , directory: "." )
!8 = !DIDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , size: 64 , baseType: !9 )
!9 = !DIDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , name: "__vtbl_ptr_type" , size: 64 , baseType: !10 )
!10 = !DISubroutineType ( types: !11 )
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
!11 = ! { !12 }
2015-04-29 16:38:44 +00:00
!12 = !DIBasicType ( 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 )
!13 = !DISubprogram ( name: "foo" , linkageName: "_ZN1C3fooEv" , line: 2 , isLocal: false , isDefinition: false , virtuality: D W _ V I R T U A L I T Y _ v i r t u a l , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 2 , file: !1 , scope: !"_ZTS1C" , type: !14 , containingType: !"_ZTS1C" )
!14 = !DISubroutineType ( types: !15 )
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
!15 = ! { null , !16 }
2015-04-29 16:38:44 +00:00
!16 = !DIDerivedType ( 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 | D I F l a g O b j e c t P o i n t e r , baseType: !"_ZTS1C" )
!18 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "bar" , line: 7 , size: 8 , align: 8 , file: !1 , elements: !2 , identifier: "_ZTS3bar" )
!19 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "D" , line: 9 , size: 8 , align: 8 , file: !1 , elements: !20 , identifier: "_ZTS1D" )
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
!20 = ! { !21 }
2015-04-29 16:38:44 +00:00
!21 = !DIDerivedType ( tag: D W _ T A G _ m e m b e r , name: "a" , line: 11 , flags: D I F l a g S t a t i c M e m b e r , file: !1 , scope: !"_ZTS1D" , baseType: !12 )
!22 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "Nested" , line: 12 , size: 8 , align: 8 , file: !1 , scope: !"_ZTS1D" , elements: !2 , identifier: "_ZTSN1D6NestedE" )
!23 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "Nested2" , line: 13 , flags: D I F l a g F w d D e c l , file: !1 , scope: !"_ZTS1D" , identifier: "_ZTSN1D7Nested2E" )
!24 = !DICompositeType ( tag: D W _ T A G _ s t r u c t u r e _ type , name: "virt<bar>" , line: 15 , size: 64 , align: 64 , file: !1 , scope: !"_ZTS1D" , elements: !25 , templateParams: !28 , identifier: "_ZTSN1D4virtI3barEE" )
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
!25 = ! { !26 }
2015-04-29 16:38:44 +00:00
!26 = !DIDerivedType ( tag: D W _ T A G _ m e m b e r , name: "values" , line: 16 , size: 64 , align: 64 , file: !1 , scope: !"_ZTSN1D4virtI3barEE" , baseType: !27 )
!27 = !DIDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , size: 64 , align: 64 , baseType: !"_ZTS3bar" )
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 = ! { !29 }
2015-04-29 16:38:44 +00:00
!29 = !DITemplateTypeParameter ( name: "T" , type: !"_ZTS3bar" )
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
!30 = ! { !31 , !32 }
2015-04-29 16:38:44 +00:00
!31 = !DISubprogram ( name: "foo" , linkageName: "_ZN1C3fooEv" , 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: false , scopeLine: 4 , file: !1 , scope: null , type: !14 , function: void ( %struct.C * ) * @_ZN1C3fooEv , declaration: !13 , variables: !2 )
!32 = !DISubprogram ( name: "test" , linkageName: "_Z4testv" , line: 20 , isLocal: false , isDefinition: true , virtualIndex: 6 , flags: D I F l a g P r o t o t y p e d , isOptimized: false , scopeLine: 20 , file: !1 , scope: !7 , type: !33 , function: void ( ) * @_Z4testv , variables: !2 )
!33 = !DISubroutineType ( types: !34 )
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
!34 = ! { null }
!35 = ! { i32 2 , !"Dwarf Version" , i32 2 }
2015-04-29 16:38:44 +00:00
!36 = !DILocalVariable ( tag: D W _ T A G _ a r g _ v a r i a b l e , name: "this" , arg: 1 , flags: D I F l a g A r t i f i c i a l | D I F l a g O b j e c t P o i n t e r , scope: !31 , type: !37 )
!37 = !DIDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , size: 64 , align: 64 , baseType: !"_ZTS1C" )
!38 = !DILocation ( line: 0 , scope: !31 )
!39 = !DILocation ( line: 5 , scope: !31 )
!40 = !DILocalVariable ( tag: D W _ T A G _ a u t o _ v a r i a b l e , name: "B" , line: 21 , scope: !32 , file: !7 , type: !41 )
!41 = !DIDerivedType ( tag: D W _ T A G _ t y p e d e f , name: "baz" , line: 8 , file: !1 , baseType: !"_ZTS3bar" )
!42 = !DILocation ( line: 21 , scope: !32 )
!43 = !DILocalVariable ( tag: D W _ T A G _ a u t o _ v a r i a b l e , name: "A" , line: 22 , scope: !32 , file: !7 , type: !44 )
!44 = !DICompositeType ( tag: D W _ T A G _ a r r a y _ type , size: 24 , align: 8 , baseType: !"_ZTS3bar" , elements: !45 )
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
!45 = ! { !46 }
2015-04-29 16:38:44 +00:00
!46 = !DISubrange ( count: 3 )
!47 = !DILocation ( line: 22 , scope: !32 )
!48 = !DILocalVariable ( tag: D W _ T A G _ a u t o _ v a r i a b l e , name: "B2" , line: 23 , scope: !32 , file: !7 , type: !49 )
!49 = !DIDerivedType ( tag: D W _ T A G _ t y p e d e f , name: "baz2" , line: 10 , file: !1 , scope: !"_ZTS1D" , baseType: !"_ZTS3bar" )
!50 = !DILocation ( line: 23 , scope: !32 )
!51 = !DILocalVariable ( tag: D W _ T A G _ a u t o _ v a r i a b l e , name: "e" , line: 24 , scope: !32 , file: !7 , type: !22 )
!52 = !DILocation ( line: 24 , scope: !32 )
!53 = !DILocalVariable ( tag: D W _ T A G _ a u t o _ v a r i a b l e , name: "p" , line: 25 , scope: !32 , file: !7 , type: !54 )
!54 = !DIDerivedType ( tag: D W _ T A G _ p o i n t e r _ type , size: 64 , align: 64 , baseType: !"_ZTSN1D7Nested2E" )
!55 = !DILocation ( line: 25 , scope: !32 )
!56 = !DILocalVariable ( tag: D W _ T A G _ a u t o _ v a r i a b l e , name: "t" , line: 26 , scope: !32 , file: !7 , type: !24 )
!57 = !DILocation ( line: 26 , scope: !32 )
!58 = !DILocation ( line: 27 , scope: !32 )
2015-03-03 17:24:31 +00:00
!59 = ! { i32 1 , !"Debug Info Version" , i32 3 }