mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
9c5542c040
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. llvm-svn: 224257
76 lines
3.6 KiB
LLVM
76 lines
3.6 KiB
LLVM
; RUN: llc < %s -o %t -filetype=obj
|
|
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
|
|
; RUN: llc < %s -o %t -filetype=obj -regalloc=basic
|
|
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
|
|
|
|
target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64"
|
|
target triple = "x86_64-apple-darwin8"
|
|
|
|
;CHECK: DW_AT_location{{.*}}(<0x1> 55 )
|
|
|
|
%0 = type { i64, i1 }
|
|
|
|
@__clz_tab = external constant [256 x i8]
|
|
|
|
define hidden i128 @__divti3(i128 %u, i128 %v) nounwind readnone {
|
|
entry:
|
|
tail call void @llvm.dbg.value(metadata i128 %u, i64 0, metadata !14, metadata !{!"0x102"}), !dbg !15
|
|
tail call void @llvm.dbg.value(metadata i64 0, i64 0, metadata !17, metadata !{!"0x102"}), !dbg !21
|
|
br i1 undef, label %bb2, label %bb4, !dbg !22
|
|
|
|
bb2: ; preds = %entry
|
|
br label %bb4, !dbg !23
|
|
|
|
bb4: ; preds = %bb2, %entry
|
|
br i1 undef, label %__udivmodti4.exit, label %bb82.i, !dbg !24
|
|
|
|
bb82.i: ; preds = %bb4
|
|
unreachable
|
|
|
|
__udivmodti4.exit: ; preds = %bb4
|
|
ret i128 undef, !dbg !27
|
|
}
|
|
|
|
declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone
|
|
|
|
declare void @llvm.dbg.value(metadata, i64, metadata, metadata) nounwind readnone
|
|
|
|
declare %0 @llvm.uadd.with.overflow.i64(i64, i64) nounwind readnone
|
|
|
|
!llvm.dbg.cu = !{!2}
|
|
!llvm.module.flags = !{!32}
|
|
|
|
!0 = !{!"0x2e\00__udivmodti4\00__udivmodti4\00\00879\001\001\000\006\00256\001\00879", !29, !1, !3, null, null, null, null, null} ; [ DW_TAG_subprogram ]
|
|
!1 = !{!"0x29", !29} ; [ DW_TAG_file_type ]
|
|
!2 = !{!"0x11\001\004.2.1 (Based on Apple Inc. build 5658) (LLVM build)\001\00\000\00\000", !29, !31, !31, !28, null, null} ; [ DW_TAG_compile_unit ]
|
|
!3 = !{!"0x15\00\000\000\000\000\000\000", !29, !1, null, !4, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
|
|
!4 = !{!5, !5, !5, !8}
|
|
!5 = !{!"0x16\00UTItype\00166\000\000\000\000", !30, !6, !7} ; [ DW_TAG_typedef ]
|
|
!6 = !{!"0x29", !30} ; [ DW_TAG_file_type ]
|
|
!7 = !{!"0x24\00\000\00128\00128\000\000\007", !29, !1} ; [ DW_TAG_base_type ]
|
|
!8 = !{!"0xf\00\000\0064\0064\000\000", !29, !1, !5} ; [ DW_TAG_pointer_type ]
|
|
!9 = !{!"0x2e\00__divti3\00__divti3\00__divti3\001094\000\001\000\006\00256\001\001094", !29, !1, !10, null, i128 (i128, i128)* @__divti3, null, null, null} ; [ DW_TAG_subprogram ]
|
|
!10 = !{!"0x15\00\000\000\000\000\000\000", !29, !1, null, !11, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
|
|
!11 = !{!12, !12, !12}
|
|
!12 = !{!"0x16\00TItype\00160\000\000\000\000", !30, !6, !13} ; [ DW_TAG_typedef ]
|
|
!13 = !{!"0x24\00\000\00128\00128\000\000\005", !29, !1} ; [ DW_TAG_base_type ]
|
|
!14 = !{!"0x101\00u\001093\000", !9, !1, !12} ; [ DW_TAG_arg_variable ]
|
|
!15 = !{i32 1093, i32 0, !9, null}
|
|
!16 = !{i64 0}
|
|
!17 = !{!"0x100\00c\001095\000", !18, !1, !19} ; [ DW_TAG_auto_variable ]
|
|
!18 = !{!"0xb\001094\000\0013", !29, !9} ; [ DW_TAG_lexical_block ]
|
|
!19 = !{!"0x16\00word_type\00424\000\000\000\000", !30, !6, !20} ; [ DW_TAG_typedef ]
|
|
!20 = !{!"0x24\00long int\000\0064\0064\000\000\005", !29, !1} ; [ DW_TAG_base_type ]
|
|
!21 = !{i32 1095, i32 0, !18, null}
|
|
!22 = !{i32 1103, i32 0, !18, null}
|
|
!23 = !{i32 1104, i32 0, !18, null}
|
|
!24 = !{i32 1003, i32 0, !25, !26}
|
|
!25 = !{!"0xb\00879\000\000", !29, !0} ; [ DW_TAG_lexical_block ]
|
|
!26 = !{i32 1107, i32 0, !18, null}
|
|
!27 = !{i32 1111, i32 0, !18, null}
|
|
!28 = !{!0, !9}
|
|
!29 = !{!"foobar.c", !"/tmp"}
|
|
!30 = !{!"foobar.h", !"/tmp"}
|
|
!31 = !{i32 0}
|
|
!32 = !{i32 1, !"Debug Info Version", i32 2}
|