mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 03:02:36 +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
38 lines
1.6 KiB
LLVM
38 lines
1.6 KiB
LLVM
; RUN: %llc_dwarf -asm-verbose -O1 -o %t < %s
|
|
; RUN: grep DW_AT_APPLE_omit_frame_ptr %t
|
|
; RUN: %llc_dwarf -disable-fp-elim -asm-verbose -O1 -o %t < %s
|
|
; RUN: grep -v DW_AT_APPLE_omit_frame_ptr %t
|
|
|
|
|
|
define i32 @foo() nounwind ssp {
|
|
entry:
|
|
%retval = alloca i32 ; <i32*> [#uses=2]
|
|
%0 = alloca i32 ; <i32*> [#uses=2]
|
|
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
|
store i32 42, i32* %0, align 4, !dbg !0
|
|
%1 = load i32* %0, align 4, !dbg !0 ; <i32> [#uses=1]
|
|
store i32 %1, i32* %retval, align 4, !dbg !0
|
|
br label %return, !dbg !0
|
|
|
|
return: ; preds = %entry
|
|
%retval1 = load i32* %retval, !dbg !0 ; <i32> [#uses=1]
|
|
ret i32 %retval1, !dbg !7
|
|
}
|
|
|
|
!llvm.dbg.cu = !{!3}
|
|
!llvm.module.flags = !{!12}
|
|
!9 = !{!1}
|
|
|
|
!0 = !{i32 2, i32 0, !1, null}
|
|
!1 = !{!"0x2e\00foo\00foo\00foo\002\000\001\000\006\000\000\002", !10, null, !4, null, i32 ()* @foo, null, null, null} ; [ DW_TAG_subprogram ]
|
|
!2 = !{!"0x29", !10} ; [ DW_TAG_file_type ]
|
|
!3 = !{!"0x11\001\004.2.1 (Based on Apple Inc. build 5658) (LLVM build)\000\00\000\00\000", !10, !11, !11, !9, null, null} ; [ DW_TAG_compile_unit ]
|
|
!4 = !{!"0x15\00\000\000\000\000\000\000", !10, !2, null, !5, null, null, null} ; [ DW_TAG_subroutine_type ] [line 0, size 0, align 0, offset 0] [from ]
|
|
!5 = !{!6}
|
|
!6 = !{!"0x24\00int\000\0032\0032\000\000\005", !10, !2} ; [ DW_TAG_base_type ]
|
|
!7 = !{i32 2, i32 0, !8, null}
|
|
!8 = !{!"0xb\002\000\000", !10, !1} ; [ DW_TAG_lexical_block ]
|
|
!10 = !{!"a.c", !"/tmp"}
|
|
!11 = !{i32 0}
|
|
!12 = !{i32 1, !"Debug Info Version", i32 2}
|