From 36936afbe4a0368947c407f9278a3ba7db3640cd Mon Sep 17 00:00:00 2001 From: Sven van Haastregt Date: Wed, 16 Aug 2023 10:00:14 +0100 Subject: [PATCH] Convert DebugInfo tests to opaque pointers (#2126) This is a bulk conversion done using the migration script. --- test/DebugInfo/DebugInfoChecksum.ll | 2 +- test/DebugInfo/DebugInfoLLVMArg.ll | 6 +- .../DebugInfoLexicalBlockDependency.ll | 4 +- test/DebugInfo/DebugInfoProducer.ll | 2 +- test/DebugInfo/Generic/2010-01-05-DbgScope.ll | 8 +- .../DebugInfo/Generic/2010-03-12-llc-crash.ll | 2 +- test/DebugInfo/Generic/2010-03-24-MemberFn.ll | 30 +++--- test/DebugInfo/Generic/2010-04-19-FramePtr.ll | 12 +-- .../Generic/2010-06-29-InlinedFnLocalVar.ll | 4 +- test/DebugInfo/Generic/2010-10-01-crash.ll | 6 +- test/DebugInfo/Generic/PR20038.ll | 52 +++++----- test/DebugInfo/Generic/dead-argument-order.ll | 4 +- .../Generic/debug-info-eis-option.ll | 6 +- test/DebugInfo/Generic/dwarf-public-names.ll | 16 +-- test/DebugInfo/Generic/enum.ll | 4 +- test/DebugInfo/Generic/func-using-decl.ll | 2 +- .../Generic/incorrect-variable-debugloc1.ll | 8 +- test/DebugInfo/Generic/inline-scopes.ll | 24 ++--- test/DebugInfo/Generic/linear-dbg-value.ll | 6 +- test/DebugInfo/Generic/member-order.ll | 10 +- .../Generic/missing-abstract-variable.ll | 2 +- .../namespace_inline_function_definition.ll | 16 +-- test/DebugInfo/Generic/restrict.ll | 8 +- .../Generic/two-cus-from-same-file.ll | 10 +- test/DebugInfo/Generic/typedef.ll | 2 +- test/DebugInfo/Generic/undef-func-call.ll | 30 +++--- test/DebugInfo/Generic/varargs.ll | 6 +- test/DebugInfo/Generic/version.ll | 2 +- .../NonSemantic/DebugInfoProducer.ll | 2 +- .../Shader200/DebugInfoStringType.ll | 6 +- .../Shader200/DebugInfoSubrange.ll | 13 ++- .../Shader200/FortranDynamicArrayExpr.ll | 4 +- .../NonSemantic/Shader200/InlineNamespace.ll | 4 +- test/DebugInfo/OpenCL100/DebugInfoSubrange.ll | 13 ++- test/DebugInfo/RecursiveDebugInfo.ll | 61 +++++------- .../DebugInfo/TransTypeCompositeCaseClass_.ll | 6 +- test/DebugInfo/UnknownBaseType.ll | 4 +- test/DebugInfo/X86/2010-04-13-PubType.ll | 26 ++--- .../X86/2011-09-26-GlobalVarContext.ll | 8 +- test/DebugInfo/X86/2011-12-16-BadStructRef.ll | 99 +++++++++---------- test/DebugInfo/X86/DIModuleContext.ll | 2 +- test/DebugInfo/X86/DW_AT_byte_size.ll | 13 ++- test/DebugInfo/X86/DW_AT_linkage_name.ll | 30 +++--- .../X86/DW_AT_stmt_list_sec_offset.ll | 2 +- test/DebugInfo/X86/InlinedFnLocalVar.ll | 4 +- test/DebugInfo/X86/aligned_stack_var.ll | 2 +- test/DebugInfo/X86/arguments.ll | 11 +-- test/DebugInfo/X86/coff_debug_info_type.ll | 2 +- test/DebugInfo/X86/coff_relative_names.ll | 2 +- test/DebugInfo/X86/constant-loclist.ll | 6 +- test/DebugInfo/X86/cu-ranges.ll | 12 +-- test/DebugInfo/X86/dbg-byval-parameter.ll | 20 ++-- test/DebugInfo/X86/dbg-declare-alloca.ll | 6 +- test/DebugInfo/X86/dbg-declare-arg.ll | 58 ++++++----- test/DebugInfo/X86/dbg-declare.ll | 30 +++--- test/DebugInfo/X86/dbg-file-name.ll | 2 +- test/DebugInfo/X86/dbg-prolog-end.ll | 22 ++--- test/DebugInfo/X86/dbg-value-const-byref.ll | 8 +- test/DebugInfo/X86/dbg-value-frame-index.ll | 6 +- test/DebugInfo/X86/dbg-value-isel.ll | 8 +- test/DebugInfo/X86/dbg-value-location.ll | 6 +- test/DebugInfo/X86/dbg-value-range.ll | 7 +- .../X86/dimodule-external-fortran.ll | 10 +- test/DebugInfo/X86/discriminator3.ll | 8 +- test/DebugInfo/X86/double-declare.ll | 10 +- .../X86/dwarf-aranges-no-dwarf-labels.ll | 2 +- test/DebugInfo/X86/dwarf-linkage-names.ll | 2 +- test/DebugInfo/X86/dwarf-public-names.ll | 16 +-- test/DebugInfo/X86/dwarf-pubnames-split.ll | 2 +- test/DebugInfo/X86/earlydup-crash.ll | 7 +- test/DebugInfo/X86/ending-run.ll | 14 +-- test/DebugInfo/X86/fi-expr.ll | 8 +- test/DebugInfo/X86/float_const.ll | 2 +- test/DebugInfo/X86/frame-register.ll | 8 +- test/DebugInfo/X86/inline-member-function.ll | 18 ++-- test/DebugInfo/X86/inline-seldag-test.ll | 12 +-- test/DebugInfo/X86/isel-cse-line.ll | 26 ++--- .../X86/lexical-block-file-inline.ll | 20 ++-- test/DebugInfo/X86/lexical_block.ll | 6 +- test/DebugInfo/X86/linkage-name.ll | 16 +-- test/DebugInfo/X86/missing-file-line.ll | 4 +- test/DebugInfo/X86/nophysreg.ll | 52 +++++----- test/DebugInfo/X86/pr13303.ll | 2 +- test/DebugInfo/X86/reference-argument.ll | 22 ++--- test/DebugInfo/X86/single-fi.ll | 8 +- test/DebugInfo/X86/subrange-type.ll | 4 +- test/DebugInfo/X86/this-stack_value.ll | 30 +++--- .../X86/type_units_with_addresses.ll | 4 +- test/DebugInfo/X86/union-const.ll | 2 +- test/DebugInfo/X86/union-template.ll | 6 +- test/DebugInfo/bitfields_packed.ll | 33 +++---- test/DebugInfo/builtin-get-global-id.ll | 2 +- test/DebugInfo/gv-before-cu.ll | 1 - .../translate_sampler_initializer.ll | 6 +- 94 files changed, 563 insertions(+), 589 deletions(-) diff --git a/test/DebugInfo/DebugInfoChecksum.ll b/test/DebugInfo/DebugInfoChecksum.ll index 1dc8e3429c..96f3d1a005 100644 --- a/test/DebugInfo/DebugInfoChecksum.ll +++ b/test/DebugInfo/DebugInfoChecksum.ll @@ -32,7 +32,7 @@ target triple = "spir" define i32 @main() #0 !dbg !10 { entry: %retval = alloca i32, align 4 - store i32 0, i32* %retval, align 4 + store i32 0, ptr %retval, align 4 ret i32 0, !dbg !15 } diff --git a/test/DebugInfo/DebugInfoLLVMArg.ll b/test/DebugInfo/DebugInfoLLVMArg.ll index 032649e195..2fd0bea058 100644 --- a/test/DebugInfo/DebugInfoLLVMArg.ll +++ b/test/DebugInfo/DebugInfoLLVMArg.ll @@ -50,11 +50,11 @@ entry: %x = alloca i32, align 4 ; CHECK-LLVM-OCL: call void @llvm.dbg.value(metadata !DIArgList(ptr %x), metadata ![[#]], metadata !DIExpression(DW_OP_LLVM_arg, 0)) ; CHECK-LLVM-200: call void @llvm.dbg.value(metadata !DIArgList(ptr %x), metadata ![[#]], metadata !DIExpression(DW_OP_LLVM_arg, 0)) - call void @llvm.dbg.value(metadata !DIArgList(i32* %x), metadata !6, metadata !DIExpression(DW_OP_LLVM_arg, 0)), !dbg !10 + call void @llvm.dbg.value(metadata !DIArgList(ptr %x), metadata !6, metadata !DIExpression(DW_OP_LLVM_arg, 0)), !dbg !10 ; CHECK-LLVM-OCL: call void @llvm.dbg.value(metadata ptr undef, metadata ![[#]], metadata !DIExpression()) ; CHECK-LLVM-200: call void @llvm.dbg.value(metadata !DIArgList(ptr %x, ptr %x), metadata ![[#]], metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus)) - call void @llvm.dbg.value(metadata !DIArgList(i32* %x, i32* %x), metadata !6, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus)), !dbg !10 - store i32 42, i32* %x, align 4 + call void @llvm.dbg.value(metadata !DIArgList(ptr %x, ptr %x), metadata !6, metadata !DIExpression(DW_OP_LLVM_arg, 0, DW_OP_LLVM_arg, 1, DW_OP_plus)), !dbg !10 + store i32 42, ptr %x, align 4 ret void } diff --git a/test/DebugInfo/DebugInfoLexicalBlockDependency.ll b/test/DebugInfo/DebugInfoLexicalBlockDependency.ll index ec65cb6d75..ce83f00906 100644 --- a/test/DebugInfo/DebugInfoLexicalBlockDependency.ll +++ b/test/DebugInfo/DebugInfoLexicalBlockDependency.ll @@ -15,9 +15,9 @@ target triple = "spir64-unknown-unknown" define spir_kernel void @test(i64 %value) #0 !dbg !9 { entry: %value.addr = alloca i32, align 1, !dbg !17 - call void @llvm.dbg.declare(metadata i32* %value.addr, metadata !13, metadata !DIExpression()), !dbg !18 + call void @llvm.dbg.declare(metadata ptr %value.addr, metadata !13, metadata !DIExpression()), !dbg !18 %value.trunc = trunc i64 %value to i32, !dbg !17 - store i32 %value.trunc, i32* %value.addr, align 4, !dbg !17 + store i32 %value.trunc, ptr %value.addr, align 4, !dbg !17 ret void } diff --git a/test/DebugInfo/DebugInfoProducer.ll b/test/DebugInfo/DebugInfoProducer.ll index 6fc05370b5..3591bb2080 100644 --- a/test/DebugInfo/DebugInfoProducer.ll +++ b/test/DebugInfo/DebugInfoProducer.ll @@ -26,7 +26,7 @@ target triple = "spir" define i32 @main() #0 !dbg !8 { entry: %retval = alloca i32, align 4 - store i32 0, i32* %retval, align 4 + store i32 0, ptr %retval, align 4 ret i32 0, !dbg !13 } diff --git a/test/DebugInfo/Generic/2010-01-05-DbgScope.ll b/test/DebugInfo/Generic/2010-01-05-DbgScope.ll index ad6afeb47a..cb48b2b44c 100644 --- a/test/DebugInfo/Generic/2010-01-05-DbgScope.ll +++ b/test/DebugInfo/Generic/2010-01-05-DbgScope.ll @@ -7,11 +7,11 @@ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" target triple = "spir64-unknown-unknown" ; PR 5942 -define i8* @foo() nounwind { +define ptr @foo() nounwind { entry: - %0 = load i32, i32* undef, align 4, !dbg !0 ; [#uses=1] - %1 = inttoptr i32 %0 to i8*, !dbg !0 ; [#uses=1] - ret i8* %1, !dbg !10 + %0 = load i32, ptr undef, align 4, !dbg !0 ; [#uses=1] + %1 = inttoptr i32 %0 to ptr, !dbg !0 ; [#uses=1] + ret ptr %1, !dbg !10 } diff --git a/test/DebugInfo/Generic/2010-03-12-llc-crash.ll b/test/DebugInfo/Generic/2010-03-12-llc-crash.ll index 86aaeccf97..9a749c3dc2 100644 --- a/test/DebugInfo/Generic/2010-03-12-llc-crash.ll +++ b/test/DebugInfo/Generic/2010-03-12-llc-crash.ll @@ -12,7 +12,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone define void @foo() { entry: - call void @llvm.dbg.declare(metadata i32* undef, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) + call void @llvm.dbg.declare(metadata ptr undef, metadata !0, metadata !DIExpression()), !dbg !DILocation(scope: !1) ret void } diff --git a/test/DebugInfo/Generic/2010-03-24-MemberFn.ll b/test/DebugInfo/Generic/2010-03-24-MemberFn.ll index 4348f1d49d..a8d342d6d9 100644 --- a/test/DebugInfo/Generic/2010-03-24-MemberFn.ll +++ b/test/DebugInfo/Generic/2010-03-24-MemberFn.ll @@ -11,33 +11,33 @@ target triple = "spir64-unknown-unknown" define i32 @_Z3barv() nounwind ssp !dbg !3 { entry: - %retval = alloca i32 ; [#uses=2] - %0 = alloca i32 ; [#uses=2] - %s1 = alloca %struct.S ; <%struct.S*> [#uses=1] + %retval = alloca i32 ; [#uses=2] + %0 = alloca i32 ; [#uses=2] + %s1 = alloca %struct.S ; [#uses=1] %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.declare(metadata %struct.S* %s1, metadata !0, metadata !DIExpression()), !dbg !16 - %1 = call i32 @_ZN1S3fooEv(%struct.S* %s1) nounwind, !dbg !17 ; [#uses=1] - store i32 %1, i32* %0, align 4, !dbg !17 - %2 = load i32, i32* %0, align 4, !dbg !17 ; [#uses=1] - store i32 %2, i32* %retval, align 4, !dbg !17 + call void @llvm.dbg.declare(metadata ptr %s1, metadata !0, metadata !DIExpression()), !dbg !16 + %1 = call i32 @_ZN1S3fooEv(ptr %s1) nounwind, !dbg !17 ; [#uses=1] + store i32 %1, ptr %0, align 4, !dbg !17 + %2 = load i32, ptr %0, align 4, !dbg !17 ; [#uses=1] + store i32 %2, ptr %retval, align 4, !dbg !17 br label %return, !dbg !17 return: ; preds = %entry - %retval1 = load i32, i32* %retval, !dbg !17 ; [#uses=1] + %retval1 = load i32, ptr %retval, !dbg !17 ; [#uses=1] ret i32 %retval1, !dbg !16 } -define linkonce_odr i32 @_ZN1S3fooEv(%struct.S* %this) nounwind ssp align 2 !dbg !12 { +define linkonce_odr i32 @_ZN1S3fooEv(ptr %this) nounwind ssp align 2 !dbg !12 { entry: - %this_addr = alloca %struct.S* ; <%struct.S**> [#uses=1] - %retval = alloca i32 ; [#uses=1] + %this_addr = alloca ptr ; [#uses=1] + %retval = alloca i32 ; [#uses=1] %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.declare(metadata %struct.S** %this_addr, metadata !18, metadata !DIExpression(DW_OP_deref)), !dbg !21 - store %struct.S* %this, %struct.S** %this_addr + call void @llvm.dbg.declare(metadata ptr %this_addr, metadata !18, metadata !DIExpression(DW_OP_deref)), !dbg !21 + store ptr %this, ptr %this_addr br label %return, !dbg !21 return: ; preds = %entry - %retval1 = load i32, i32* %retval, !dbg !21 ; [#uses=1] + %retval1 = load i32, ptr %retval, !dbg !21 ; [#uses=1] ret i32 %retval1, !dbg !22 } diff --git a/test/DebugInfo/Generic/2010-04-19-FramePtr.ll b/test/DebugInfo/Generic/2010-04-19-FramePtr.ll index 48c1478064..4102a3719d 100644 --- a/test/DebugInfo/Generic/2010-04-19-FramePtr.ll +++ b/test/DebugInfo/Generic/2010-04-19-FramePtr.ll @@ -15,16 +15,16 @@ target triple = "spir64-unknown-unknown" define i32 @foo() nounwind ssp !dbg !1 { entry: - %retval = alloca i32 ; [#uses=2] - %0 = alloca i32 ; [#uses=2] + %retval = alloca i32 ; [#uses=2] + %0 = alloca i32 ; [#uses=2] %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - store i32 42, i32* %0, align 4, !dbg !0 - %1 = load i32, i32* %0, align 4, !dbg !0 ; [#uses=1] - store i32 %1, i32* %retval, align 4, !dbg !0 + store i32 42, ptr %0, align 4, !dbg !0 + %1 = load i32, ptr %0, align 4, !dbg !0 ; [#uses=1] + store i32 %1, ptr %retval, align 4, !dbg !0 br label %return, !dbg !0 return: ; preds = %entry - %retval1 = load i32, i32* %retval, !dbg !0 ; [#uses=1] + %retval1 = load i32, ptr %retval, !dbg !0 ; [#uses=1] ret i32 %retval1, !dbg !7 } diff --git a/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll b/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll index 47ef1a2bd7..9b2f0c3f69 100644 --- a/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll +++ b/test/DebugInfo/Generic/2010-06-29-InlinedFnLocalVar.ll @@ -25,11 +25,11 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) #0 ; Function Attrs: nounwind ssp define i32 @bar() #1 !dbg !8 { entry: - %0 = load i32, i32* @i, align 4, !dbg !11 + %0 = load i32, ptr @i, align 4, !dbg !11 tail call void @llvm.dbg.value(metadata i32 %0, metadata !13, metadata !24), !dbg !25 tail call void @llvm.dbg.declare(metadata !5, metadata !18, metadata !24), !dbg !26 %1 = mul nsw i32 %0, %0, !dbg !27 - store i32 %1, i32* @i, align 4, !dbg !11 + store i32 %1, ptr @i, align 4, !dbg !11 ret i32 %1, !dbg !28 } diff --git a/test/DebugInfo/Generic/2010-10-01-crash.ll b/test/DebugInfo/Generic/2010-10-01-crash.ll index 8f5559c2d3..7b29d5238e 100644 --- a/test/DebugInfo/Generic/2010-10-01-crash.ll +++ b/test/DebugInfo/Generic/2010-10-01-crash.ll @@ -7,15 +7,15 @@ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" target triple = "spir64-unknown-unknown" -define void @CGRectStandardize(i32* sret(i32) %agg.result, i32* byval(i32) %rect) nounwind ssp !dbg !0 { +define void @CGRectStandardize(ptr sret(i32) %agg.result, ptr byval(i32) %rect) nounwind ssp !dbg !0 { entry: - call void @llvm.dbg.declare(metadata i32* %rect, metadata !23, metadata !DIExpression()), !dbg !24 + call void @llvm.dbg.declare(metadata ptr %rect, metadata !23, metadata !DIExpression()), !dbg !24 ret void } declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -declare void @llvm.memcpy.p0i8.p0i8.i32(i8* nocapture, i8* nocapture, i32, i1) nounwind +declare void @llvm.memcpy.p0.p0.i32(ptr nocapture, ptr nocapture, i32, i1) nounwind !llvm.dbg.cu = !{!2} diff --git a/test/DebugInfo/Generic/PR20038.ll b/test/DebugInfo/Generic/PR20038.ll index 94946aa6b2..49cdf55f25 100644 --- a/test/DebugInfo/Generic/PR20038.ll +++ b/test/DebugInfo/Generic/PR20038.ll @@ -64,31 +64,31 @@ target triple = "spir64-unknown-unknown" ; Function Attrs: nounwind define void @_Z4fun4v() #0 !dbg !12 { entry: - %this.addr.i.i = alloca %struct.C*, align 8, !dbg !21 - %this.addr.i = alloca %struct.C*, align 8, !dbg !22 + %this.addr.i.i = alloca ptr, align 8, !dbg !21 + %this.addr.i = alloca ptr, align 8, !dbg !22 %agg.tmp.ensured = alloca %struct.C, align 1 %cleanup.cond = alloca i1 - %0 = load i8, i8* @b, align 1, !dbg !24 + %0 = load i8, ptr @b, align 1, !dbg !24 %tobool = trunc i8 %0 to i1, !dbg !24 - store i1 false, i1* %cleanup.cond + store i1 false, ptr %cleanup.cond br i1 %tobool, label %land.rhs, label %land.end, !dbg !24 land.rhs: ; preds = %entry - store i1 true, i1* %cleanup.cond, !dbg !25 + store i1 true, ptr %cleanup.cond, !dbg !25 br label %land.end land.end: ; preds = %land.rhs, %entry %1 = phi i1 [ false, %entry ], [ true, %land.rhs ] - %cleanup.is_active = load i1, i1* %cleanup.cond, !dbg !27 + %cleanup.is_active = load i1, ptr %cleanup.cond, !dbg !27 br i1 %cleanup.is_active, label %cleanup.action, label %cleanup.done, !dbg !27 cleanup.action: ; preds = %land.end - store %struct.C* %agg.tmp.ensured, %struct.C** %this.addr.i, align 8, !dbg !22 - call void @llvm.dbg.declare(metadata %struct.C** %this.addr.i, metadata !129, metadata !DIExpression()), !dbg !31 - %this1.i = load %struct.C*, %struct.C** %this.addr.i, !dbg !22 - store %struct.C* %this1.i, %struct.C** %this.addr.i.i, align 8, !dbg !21 - call void @llvm.dbg.declare(metadata %struct.C** %this.addr.i.i, metadata !132, metadata !DIExpression()), !dbg !33 - %this1.i.i = load %struct.C*, %struct.C** %this.addr.i.i, !dbg !21 + store ptr %agg.tmp.ensured, ptr %this.addr.i, align 8, !dbg !22 + call void @llvm.dbg.declare(metadata ptr %this.addr.i, metadata !129, metadata !DIExpression()), !dbg !31 + %this1.i = load ptr, ptr %this.addr.i, !dbg !22 + store ptr %this1.i, ptr %this.addr.i.i, align 8, !dbg !21 + call void @llvm.dbg.declare(metadata ptr %this.addr.i.i, metadata !132, metadata !DIExpression()), !dbg !33 + %this1.i.i = load ptr, ptr %this.addr.i.i, !dbg !21 br label %cleanup.done, !dbg !22 cleanup.done: ; preds = %cleanup.action, %land.end @@ -96,26 +96,26 @@ cleanup.done: ; preds = %cleanup.action, %la } ; Function Attrs: alwaysinline nounwind -define void @_ZN1CD1Ev(%struct.C* %this) unnamed_addr #1 align 2 !dbg !17 { +define void @_ZN1CD1Ev(ptr %this) unnamed_addr #1 align 2 !dbg !17 { entry: - %this.addr.i = alloca %struct.C*, align 8, !dbg !37 - %this.addr = alloca %struct.C*, align 8 - store %struct.C* %this, %struct.C** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !29, metadata !DIExpression()), !dbg !38 - %this1 = load %struct.C*, %struct.C** %this.addr - store %struct.C* %this1, %struct.C** %this.addr.i, align 8, !dbg !37 - call void @llvm.dbg.declare(metadata %struct.C** %this.addr.i, metadata !232, metadata !DIExpression()), !dbg !39 - %this1.i = load %struct.C*, %struct.C** %this.addr.i, !dbg !37 + %this.addr.i = alloca ptr, align 8, !dbg !37 + %this.addr = alloca ptr, align 8 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !29, metadata !DIExpression()), !dbg !38 + %this1 = load ptr, ptr %this.addr + store ptr %this1, ptr %this.addr.i, align 8, !dbg !37 + call void @llvm.dbg.declare(metadata ptr %this.addr.i, metadata !232, metadata !DIExpression()), !dbg !39 + %this1.i = load ptr, ptr %this.addr.i, !dbg !37 ret void, !dbg !37 } ; Function Attrs: alwaysinline nounwind -define void @_ZN1CD2Ev(%struct.C* %this) unnamed_addr #1 align 2 !dbg !16 { +define void @_ZN1CD2Ev(ptr %this) unnamed_addr #1 align 2 !dbg !16 { entry: - %this.addr = alloca %struct.C*, align 8 - store %struct.C* %this, %struct.C** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !32, metadata !DIExpression()), !dbg !40 - %this1 = load %struct.C*, %struct.C** %this.addr + %this.addr = alloca ptr, align 8 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !32, metadata !DIExpression()), !dbg !40 + %this1 = load ptr, ptr %this.addr ret void, !dbg !41 } diff --git a/test/DebugInfo/Generic/dead-argument-order.ll b/test/DebugInfo/Generic/dead-argument-order.ll index b55a21c8a1..51ee28a795 100644 --- a/test/DebugInfo/Generic/dead-argument-order.ll +++ b/test/DebugInfo/Generic/dead-argument-order.ll @@ -45,7 +45,7 @@ target triple = "spir64-unknown-unknown" ; Function Attrs: nounwind readnone uwtable define i32 @_Z8function1Si(i32 %s.coerce, i32 %i) #0 !dbg !9 { entry: - tail call void @llvm.dbg.declare(metadata %struct.S* undef, metadata !14, metadata !DIExpression()), !dbg !20 + tail call void @llvm.dbg.declare(metadata ptr undef, metadata !14, metadata !DIExpression()), !dbg !20 tail call void @llvm.dbg.value(metadata i32 %i, metadata !15, metadata !DIExpression()), !dbg !20 %add = add nsw i32 %i, %s.coerce, !dbg !20 ret i32 %add, !dbg !20 @@ -82,6 +82,6 @@ attributes #1 = { nounwind readnone } !16 = !{i32 2, !"Dwarf Version", i32 4} !17 = !{i32 2, !"Debug Info Version", i32 3} !18 = !{!"clang version 3.5.0 "} -!19 = !{%struct.S* undef} +!19 = !{ptr undef} !20 = !DILocation(line: 2, scope: !9) diff --git a/test/DebugInfo/Generic/debug-info-eis-option.ll b/test/DebugInfo/Generic/debug-info-eis-option.ll index 627e4e4be6..20c25d679b 100644 --- a/test/DebugInfo/Generic/debug-info-eis-option.ll +++ b/test/DebugInfo/Generic/debug-info-eis-option.ll @@ -15,7 +15,7 @@ target triple = "spir64-unknown-unknown" source_filename = "linear-dbg-value.ll" ; Function Attrs: nounwind readonly uwtable -define i32 @foo(i32* nocapture readonly %a, i32 %N) local_unnamed_addr #0 !dbg !6 { +define i32 @foo(ptr nocapture readonly %a, i32 %N) local_unnamed_addr #0 !dbg !6 { entry: %cmp6 = icmp sgt i32 %N, 0, !dbg !11 br i1 %cmp6, label %for.body.preheader, label %for.cond.cleanup, !dbg !15 @@ -38,8 +38,8 @@ for.body: ; preds = %for.body, %for.body ; CHECK: DBG_VALUE {{.*}} ![[X]], !DIExpression() %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] %x.07 = phi i32 [ %add, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv, !dbg !17 - %0 = load i32, i32* %arrayidx, align 4, !dbg !17 + %arrayidx = getelementptr inbounds i32, ptr %a, i64 %indvars.iv, !dbg !17 + %0 = load i32, ptr %arrayidx, align 4, !dbg !17 %add = add nsw i32 %0, %x.07, !dbg !17 call void @llvm.dbg.value(metadata i32 %add, metadata !9, metadata !DIExpression()), !dbg !20 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1, !dbg !21 diff --git a/test/DebugInfo/Generic/dwarf-public-names.ll b/test/DebugInfo/Generic/dwarf-public-names.ll index b0adbe68d8..dd529a38c3 100644 --- a/test/DebugInfo/Generic/dwarf-public-names.ll +++ b/test/DebugInfo/Generic/dwarf-public-names.ll @@ -65,13 +65,13 @@ source_filename = "test/DebugInfo/Generic/dwarf-public-names.ll" @_ZN2ns25global_namespace_variableE = global i32 1, align 4, !dbg !17 ; Function Attrs: nounwind uwtable -define void @_ZN1C15member_functionEv(%struct.C* %this) #0 align 2 !dbg !23 { +define void @_ZN1C15member_functionEv(ptr %this) #0 align 2 !dbg !23 { entry: - %this.addr = alloca %struct.C*, align 8 - store %struct.C* %this, %struct.C** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.C** %this.addr, metadata !24, metadata !26), !dbg !27 - %this1 = load %struct.C*, %struct.C** %this.addr - store i32 0, i32* @_ZN1C22static_member_variableE, align 4, !dbg !28 + %this.addr = alloca ptr, align 8 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !24, metadata !26), !dbg !27 + %this1 = load ptr, ptr %this.addr + store i32 0, ptr @_ZN1C22static_member_variableE, align 4, !dbg !28 ret void, !dbg !29 } @@ -81,7 +81,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind uwtable define i32 @_ZN1C22static_member_functionEv() #0 align 2 !dbg !30 { entry: - %0 = load i32, i32* @_ZN1C22static_member_variableE, align 4, !dbg !31 + %0 = load i32, ptr @_ZN1C22static_member_variableE, align 4, !dbg !31 ret i32 %0, !dbg !31 } @@ -94,7 +94,7 @@ entry: ; Function Attrs: nounwind uwtable define void @_ZN2ns25global_namespace_functionEv() #0 !dbg !34 { entry: - call void @_ZN1C15member_functionEv(%struct.C* @global_variable), !dbg !37 + call void @_ZN1C15member_functionEv(ptr @global_variable), !dbg !37 ret void, !dbg !38 } diff --git a/test/DebugInfo/Generic/enum.ll b/test/DebugInfo/Generic/enum.ll index 98bf6f776d..5f0bd5ce5b 100644 --- a/test/DebugInfo/Generic/enum.ll +++ b/test/DebugInfo/Generic/enum.ll @@ -48,8 +48,8 @@ source_filename = "test/DebugInfo/Generic/enum.ll" define void @_Z4funcv() #0 !dbg !17 { entry: %b = alloca i32, align 4 - call void @llvm.dbg.declare(metadata i32* %b, metadata !20, metadata !22), !dbg !23 - store i32 0, i32* %b, align 4, !dbg !23 + call void @llvm.dbg.declare(metadata ptr %b, metadata !20, metadata !22), !dbg !23 + store i32 0, ptr %b, align 4, !dbg !23 ret void, !dbg !24 } diff --git a/test/DebugInfo/Generic/func-using-decl.ll b/test/DebugInfo/Generic/func-using-decl.ll index 4be55a6d13..c59ef53509 100644 --- a/test/DebugInfo/Generic/func-using-decl.ll +++ b/test/DebugInfo/Generic/func-using-decl.ll @@ -38,7 +38,7 @@ source_filename = "test/DebugInfo/Generic/func-using-decl.ll" define dso_local i32 @main() #0 !dbg !14 { entry: %retval = alloca i32, align 4 - store i32 0, i32* %retval, align 4 + store i32 0, ptr %retval, align 4 ret i32 0, !dbg !17 } diff --git a/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll b/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll index 856a0b69b9..13f7671c45 100644 --- a/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll +++ b/test/DebugInfo/Generic/incorrect-variable-debugloc1.ll @@ -42,12 +42,12 @@ define i32 @main() #0 !dbg !4 { entry: %c = alloca i32, align 4 tail call void @llvm.dbg.value(metadata i32 13, metadata !10, metadata !16), !dbg !17 - store volatile i32 13, i32* %c, align 4, !dbg !18 + store volatile i32 13, ptr %c, align 4, !dbg !18 %call = tail call i32 @_Z4funcv(), !dbg !19 tail call void @llvm.dbg.value(metadata i32 %call, metadata !10, metadata !16), !dbg !17 - store volatile i32 %call, i32* %c, align 4, !dbg !19 - tail call void @llvm.dbg.value(metadata i32* %c, metadata !10, metadata !21), !dbg !17 - %c.0.c.0. = load volatile i32, i32* %c, align 4, !dbg !20 + store volatile i32 %call, ptr %c, align 4, !dbg !19 + tail call void @llvm.dbg.value(metadata ptr %c, metadata !10, metadata !21), !dbg !17 + %c.0.c.0. = load volatile i32, ptr %c, align 4, !dbg !20 ret i32 %c.0.c.0., !dbg !20 } diff --git a/test/DebugInfo/Generic/inline-scopes.ll b/test/DebugInfo/Generic/inline-scopes.ll index 1b18910af0..2abfb1ae62 100644 --- a/test/DebugInfo/Generic/inline-scopes.ll +++ b/test/DebugInfo/Generic/inline-scopes.ll @@ -50,42 +50,42 @@ entry: %b.i3 = alloca i8, align 1 %retval.i = alloca i32, align 4 %b.i = alloca i8, align 1 - call void @llvm.dbg.declare(metadata i8* %b.i, metadata !16, metadata !DIExpression()), !dbg !19 + call void @llvm.dbg.declare(metadata ptr %b.i, metadata !16, metadata !DIExpression()), !dbg !19 %call.i = call zeroext i1 @_Z1fv(), !dbg !19 %frombool.i = zext i1 %call.i to i8, !dbg !19 - store i8 %frombool.i, i8* %b.i, align 1, !dbg !19 - %0 = load i8, i8* %b.i, align 1, !dbg !19 + store i8 %frombool.i, ptr %b.i, align 1, !dbg !19 + %0 = load i8, ptr %b.i, align 1, !dbg !19 %tobool.i = trunc i8 %0 to i1, !dbg !19 br i1 %tobool.i, label %if.then.i, label %if.end.i, !dbg !19 if.then.i: ; preds = %entry - store i32 1, i32* %retval.i, !dbg !21 + store i32 1, ptr %retval.i, !dbg !21 br label %_Z2f1v.exit, !dbg !21 if.end.i: ; preds = %entry - store i32 2, i32* %retval.i, !dbg !22 + store i32 2, ptr %retval.i, !dbg !22 br label %_Z2f1v.exit, !dbg !22 _Z2f1v.exit: ; preds = %if.then.i, %if.end.i - %1 = load i32, i32* %retval.i, !dbg !23 - call void @llvm.dbg.declare(metadata i8* %b.i3, metadata !24, metadata !DIExpression()), !dbg !27 + %1 = load i32, ptr %retval.i, !dbg !23 + call void @llvm.dbg.declare(metadata ptr %b.i3, metadata !24, metadata !DIExpression()), !dbg !27 %call.i4 = call zeroext i1 @_Z1fv(), !dbg !27 %frombool.i5 = zext i1 %call.i4 to i8, !dbg !27 - store i8 %frombool.i5, i8* %b.i3, align 1, !dbg !27 - %2 = load i8, i8* %b.i3, align 1, !dbg !27 + store i8 %frombool.i5, ptr %b.i3, align 1, !dbg !27 + %2 = load i8, ptr %b.i3, align 1, !dbg !27 %tobool.i6 = trunc i8 %2 to i1, !dbg !27 br i1 %tobool.i6, label %if.then.i7, label %if.end.i8, !dbg !27 if.then.i7: ; preds = %_Z2f1v.exit - store i32 3, i32* %retval.i2, !dbg !29 + store i32 3, ptr %retval.i2, !dbg !29 br label %_Z2f2v.exit, !dbg !29 if.end.i8: ; preds = %_Z2f1v.exit - store i32 4, i32* %retval.i2, !dbg !30 + store i32 4, ptr %retval.i2, !dbg !30 br label %_Z2f2v.exit, !dbg !30 _Z2f2v.exit: ; preds = %if.then.i7, %if.end.i8 - %3 = load i32, i32* %retval.i2, !dbg !31 + %3 = load i32, ptr %retval.i2, !dbg !31 ret i32 0, !dbg !32 } diff --git a/test/DebugInfo/Generic/linear-dbg-value.ll b/test/DebugInfo/Generic/linear-dbg-value.ll index b558ab24a6..b4bd79b374 100644 --- a/test/DebugInfo/Generic/linear-dbg-value.ll +++ b/test/DebugInfo/Generic/linear-dbg-value.ll @@ -15,7 +15,7 @@ target triple = "spir64-unknown-unknown" source_filename = "linear-dbg-value.ll" ; Function Attrs: nounwind readonly uwtable -define i32 @foo(i32* nocapture readonly %a, i32 %N) local_unnamed_addr #0 !dbg !6 { +define i32 @foo(ptr nocapture readonly %a, i32 %N) local_unnamed_addr #0 !dbg !6 { entry: %cmp6 = icmp sgt i32 %N, 0, !dbg !11 br i1 %cmp6, label %for.body.preheader, label %for.cond.cleanup, !dbg !15 @@ -38,8 +38,8 @@ for.body: ; preds = %for.body, %for.body ; CHECK: DBG_VALUE {{.*}} ![[X]], !DIExpression() %indvars.iv = phi i64 [ %indvars.iv.next, %for.body ], [ 0, %for.body.preheader ] %x.07 = phi i32 [ %add, %for.body ], [ 0, %for.body.preheader ] - %arrayidx = getelementptr inbounds i32, i32* %a, i64 %indvars.iv, !dbg !17 - %0 = load i32, i32* %arrayidx, align 4, !dbg !17 + %arrayidx = getelementptr inbounds i32, ptr %a, i64 %indvars.iv, !dbg !17 + %0 = load i32, ptr %arrayidx, align 4, !dbg !17 %add = add nsw i32 %0, %x.07, !dbg !17 call void @llvm.dbg.value(metadata i32 %add, metadata !9, metadata !DIExpression()), !dbg !20 %indvars.iv.next = add nuw nsw i64 %indvars.iv, 1, !dbg !21 diff --git a/test/DebugInfo/Generic/member-order.ll b/test/DebugInfo/Generic/member-order.ll index c9f4ad2190..5b04716dd8 100644 --- a/test/DebugInfo/Generic/member-order.ll +++ b/test/DebugInfo/Generic/member-order.ll @@ -32,12 +32,12 @@ target triple = "spir64-unknown-unknown" %struct.foo = type { i8 } ; Function Attrs: nounwind uwtable -define void @_ZN3foo2f1Ev(%struct.foo* %this) #0 align 2 !dbg !14 { +define void @_ZN3foo2f1Ev(ptr %this) #0 align 2 !dbg !14 { entry: - %this.addr = alloca %struct.foo*, align 8 - store %struct.foo* %this, %struct.foo** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.foo** %this.addr, metadata !16, metadata !DIExpression()), !dbg !18 - %this1 = load %struct.foo*, %struct.foo** %this.addr + %this.addr = alloca ptr, align 8 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !16, metadata !DIExpression()), !dbg !18 + %this1 = load ptr, ptr %this.addr ret void, !dbg !19 } diff --git a/test/DebugInfo/Generic/missing-abstract-variable.ll b/test/DebugInfo/Generic/missing-abstract-variable.ll index dab794fe2a..abd24c0259 100644 --- a/test/DebugInfo/Generic/missing-abstract-variable.ll +++ b/test/DebugInfo/Generic/missing-abstract-variable.ll @@ -114,7 +114,7 @@ entry: br i1 %u, label %if.then.i, label %_Z1xb.exit, !dbg !34 if.then.i: ; preds = %entry - %0 = load i32, i32* @t, align 4, !dbg !35, !tbaa !36 + %0 = load i32, ptr @t, align 4, !dbg !35, !tbaa !36 tail call void @llvm.dbg.value(metadata i32 %0, metadata !40, metadata !DIExpression()), !dbg !35 tail call void @_Z1fi(i32 %0), !dbg !41 br label %_Z1xb.exit, !dbg !42 diff --git a/test/DebugInfo/Generic/namespace_inline_function_definition.ll b/test/DebugInfo/Generic/namespace_inline_function_definition.ll index c70ced9894..081c61269c 100644 --- a/test/DebugInfo/Generic/namespace_inline_function_definition.ll +++ b/test/DebugInfo/Generic/namespace_inline_function_definition.ll @@ -46,11 +46,11 @@ define i32 @main() #0 !dbg !4 { entry: %i.addr.i = alloca i32, align 4 %retval = alloca i32, align 4 - store i32 0, i32* %retval - %0 = load i32, i32* @x, align 4, !dbg !16 - store i32 %0, i32* %i.addr.i, align 4 - call void @llvm.dbg.declare(metadata i32* %i.addr.i, metadata !117, metadata !DIExpression()), !dbg !18 - %1 = load i32, i32* %i.addr.i, align 4, !dbg !18 + store i32 0, ptr %retval + %0 = load i32, ptr @x, align 4, !dbg !16 + store i32 %0, ptr %i.addr.i, align 4 + call void @llvm.dbg.declare(metadata ptr %i.addr.i, metadata !117, metadata !DIExpression()), !dbg !18 + %1 = load i32, ptr %i.addr.i, align 4, !dbg !18 %mul.i = mul nsw i32 %1, 2, !dbg !18 ret i32 %mul.i, !dbg !16 } @@ -59,9 +59,9 @@ entry: define i32 @_ZN2ns4funcEi(i32 %i) #1 !dbg !9 { entry: %i.addr = alloca i32, align 4 - store i32 %i, i32* %i.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %i.addr, metadata !17, metadata !DIExpression()), !dbg !19 - %0 = load i32, i32* %i.addr, align 4, !dbg !19 + store i32 %i, ptr %i.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %i.addr, metadata !17, metadata !DIExpression()), !dbg !19 + %0 = load i32, ptr %i.addr, align 4, !dbg !19 %mul = mul nsw i32 %0, 2, !dbg !19 ret i32 %mul, !dbg !19 } diff --git a/test/DebugInfo/Generic/restrict.ll b/test/DebugInfo/Generic/restrict.ll index 85043e9319..4f4f38f7ef 100644 --- a/test/DebugInfo/Generic/restrict.ll +++ b/test/DebugInfo/Generic/restrict.ll @@ -24,11 +24,11 @@ target triple = "spir64-unknown-unknown" ; Function Attrs: nounwind uwtable -define void @_Z3fooPv(i8* noalias %dst) #0 !dbg !4 { +define void @_Z3fooPv(ptr noalias %dst) #0 !dbg !4 { entry: - %dst.addr = alloca i8*, align 8 - store i8* %dst, i8** %dst.addr, align 8 - call void @llvm.dbg.declare(metadata i8** %dst.addr, metadata !13, metadata !DIExpression()), !dbg !14 + %dst.addr = alloca ptr, align 8 + store ptr %dst, ptr %dst.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %dst.addr, metadata !13, metadata !DIExpression()), !dbg !14 ret void, !dbg !15 } diff --git a/test/DebugInfo/Generic/two-cus-from-same-file.ll b/test/DebugInfo/Generic/two-cus-from-same-file.ll index 4fdcab9581..73b66cf14b 100644 --- a/test/DebugInfo/Generic/two-cus-from-same-file.ll +++ b/test/DebugInfo/Generic/two-cus-from-same-file.ll @@ -22,18 +22,18 @@ target triple = "spir64-unknown-unknown" define void @foo() nounwind !dbg !5 { entry: - %puts = tail call i32 @puts(i8* getelementptr inbounds ([4 x i8], [4 x i8]* @str, i32 0, i32 0)), !dbg !23 + %puts = tail call i32 @puts(ptr @str), !dbg !23 ret void, !dbg !25 } -declare i32 @puts(i8* nocapture) nounwind +declare i32 @puts(ptr nocapture) nounwind -define i32 @main(i32 %argc, i8** nocapture %argv) nounwind !dbg !12 { +define i32 @main(i32 %argc, ptr nocapture %argv) nounwind !dbg !12 { entry: tail call void @llvm.dbg.value(metadata i32 %argc, metadata !21, metadata !DIExpression()), !dbg !26 ; Avoid talking about the pointer size in debug info because that's target dependent - tail call void @llvm.dbg.value(metadata i8** %argv, metadata !22, metadata !DIExpression(DW_OP_deref, DW_OP_deref)), !dbg !27 - %puts = tail call i32 @puts(i8* getelementptr inbounds ([6 x i8], [6 x i8]* @str1, i32 0, i32 0)), !dbg !28 + tail call void @llvm.dbg.value(metadata ptr %argv, metadata !22, metadata !DIExpression(DW_OP_deref, DW_OP_deref)), !dbg !27 + %puts = tail call i32 @puts(ptr @str1), !dbg !28 tail call void @foo() nounwind, !dbg !30 ret i32 0, !dbg !31 } diff --git a/test/DebugInfo/Generic/typedef.ll b/test/DebugInfo/Generic/typedef.ll index b4658889e1..f4930449b5 100644 --- a/test/DebugInfo/Generic/typedef.ll +++ b/test/DebugInfo/Generic/typedef.ll @@ -21,7 +21,7 @@ target triple = "spir64-unknown-unknown" source_filename = "test/DebugInfo/Generic/typedef.ll" -@y = global i8* null, align 8, !dbg !0 +@y = global ptr null, align 8, !dbg !0 !llvm.dbg.cu = !{!5} !llvm.module.flags = !{!8, !9} diff --git a/test/DebugInfo/Generic/undef-func-call.ll b/test/DebugInfo/Generic/undef-func-call.ll index 315a01d3bb..d85dc1c4d2 100644 --- a/test/DebugInfo/Generic/undef-func-call.ll +++ b/test/DebugInfo/Generic/undef-func-call.ll @@ -19,36 +19,36 @@ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256: target triple = "spir64" ; Function Attrs: convergent noinline norecurse nounwind optnone -define dso_local spir_kernel void @foo(float addrspace(1)* %outPtr, i32 %i) #0 !dbg !9 !kernel_arg_addr_space !6 !kernel_arg_access_qual !11 !kernel_arg_type !12 !kernel_arg_base_type !12 !kernel_arg_type_qual !13 { +define dso_local spir_kernel void @foo(ptr addrspace(1) %outPtr, i32 %i) #0 !dbg !9 !kernel_arg_addr_space !6 !kernel_arg_access_qual !11 !kernel_arg_type !12 !kernel_arg_base_type !12 !kernel_arg_type_qual !13 { entry: - %outPtr.addr = alloca float addrspace(1)*, align 8 + %outPtr.addr = alloca ptr addrspace(1), align 8 %i.addr = alloca i32, align 4 %j = alloca i32, align 4 - store float addrspace(1)* %outPtr, float addrspace(1)** %outPtr.addr, align 8 - store i32 %i, i32* %i.addr, align 4 - store i32 0, i32* %j, align 4, !dbg !14 + store ptr addrspace(1) %outPtr, ptr %outPtr.addr, align 8 + store i32 %i, ptr %i.addr, align 4 + store i32 0, ptr %j, align 4, !dbg !14 br label %for.cond, !dbg !15 for.cond: ; preds = %for.inc, %entry - %0 = load i32, i32* %j, align 4, !dbg !16 - %1 = load i32, i32* %i.addr, align 4, !dbg !17 + %0 = load i32, ptr %j, align 4, !dbg !16 + %1 = load i32, ptr %i.addr, align 4, !dbg !17 %cmp = icmp slt i32 %0, %1, !dbg !18 br i1 %cmp, label %for.body, label %for.end, !dbg !19 for.body: ; preds = %for.cond - %2 = load i32, i32* %j, align 4, !dbg !20 + %2 = load i32, ptr %j, align 4, !dbg !20 %call = call spir_func float @bar(i32 %2) #2, !dbg !21 - %3 = load float addrspace(1)*, float addrspace(1)** %outPtr.addr, align 8, !dbg !22 - %4 = load i32, i32* %j, align 4, !dbg !23 + %3 = load ptr addrspace(1), ptr %outPtr.addr, align 8, !dbg !22 + %4 = load i32, ptr %j, align 4, !dbg !23 %idxprom = sext i32 %4 to i64, !dbg !22 - %arrayidx = getelementptr inbounds float, float addrspace(1)* %3, i64 %idxprom, !dbg !22 - store float %call, float addrspace(1)* %arrayidx, align 4, !dbg !24 + %arrayidx = getelementptr inbounds float, ptr addrspace(1) %3, i64 %idxprom, !dbg !22 + store float %call, ptr addrspace(1) %arrayidx, align 4, !dbg !24 br label %for.inc, !dbg !25 for.inc: ; preds = %for.body - %5 = load i32, i32* %j, align 4, !dbg !26 + %5 = load i32, ptr %j, align 4, !dbg !26 %inc = add nsw i32 %5, 1, !dbg !26 - store i32 %inc, i32* %j, align 4, !dbg !26 + store i32 %inc, ptr %j, align 4, !dbg !26 br label %for.cond, !dbg !19, !llvm.loop !27 for.end: ; preds = %for.cond @@ -80,7 +80,7 @@ attributes #2 = { convergent } !9 = distinct !DISubprogram(name: "foo", scope: !1, file: !1, line: 3, type: !10, scopeLine: 3, flags: DIFlagPrototyped, spFlags: DISPFlagDefinition, unit: !0, retainedNodes: !2) !10 = !DISubroutineType(types: !2) !11 = !{!"none", !"none"} -!12 = !{!"float*", !"int"} +!12 = !{!"ptr", !"int"} !13 = !{!"", !""} !14 = !DILocation(line: 5, column: 12, scope: !9) !15 = !DILocation(line: 5, column: 8, scope: !9) diff --git a/test/DebugInfo/Generic/varargs.ll b/test/DebugInfo/Generic/varargs.ll index 70faffe757..2da3a7d3b8 100644 --- a/test/DebugInfo/Generic/varargs.ll +++ b/test/DebugInfo/Generic/varargs.ll @@ -51,9 +51,9 @@ define spir_func void @_Z1biz(i32 %c, ...) #0 !dbg !6 { entry: %c.addr = alloca i32, align 4 %a = alloca %struct.A, align 1 - store i32 %c, i32* %c.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %c.addr, metadata !11, metadata !DIExpression()), !dbg !12 - call void @llvm.dbg.declare(metadata %struct.A* %a, metadata !13, metadata !DIExpression()), !dbg !20 + store i32 %c, ptr %c.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %c.addr, metadata !11, metadata !DIExpression()), !dbg !12 + call void @llvm.dbg.declare(metadata ptr %a, metadata !13, metadata !DIExpression()), !dbg !20 ret void, !dbg !21 } diff --git a/test/DebugInfo/Generic/version.ll b/test/DebugInfo/Generic/version.ll index 7eb8325069..ca07f35961 100644 --- a/test/DebugInfo/Generic/version.ll +++ b/test/DebugInfo/Generic/version.ll @@ -19,7 +19,7 @@ target triple = "spir64-unknown-unknown" define i32 @main() #0 !dbg !4 { entry: %retval = alloca i32, align 4 - store i32 0, i32* %retval + store i32 0, ptr %retval ret i32 0, !dbg !10 } diff --git a/test/DebugInfo/NonSemantic/DebugInfoProducer.ll b/test/DebugInfo/NonSemantic/DebugInfoProducer.ll index c812301844..f242f594e8 100644 --- a/test/DebugInfo/NonSemantic/DebugInfoProducer.ll +++ b/test/DebugInfo/NonSemantic/DebugInfoProducer.ll @@ -33,7 +33,7 @@ target triple = "spir" define i32 @main() #0 !dbg !8 { entry: %retval = alloca i32, align 4 - store i32 0, i32* %retval, align 4 + store i32 0, ptr %retval, align 4 ret i32 0, !dbg !13 } diff --git a/test/DebugInfo/NonSemantic/Shader200/DebugInfoStringType.ll b/test/DebugInfo/NonSemantic/Shader200/DebugInfoStringType.ll index 925e6f4015..5909193a47 100644 --- a/test/DebugInfo/NonSemantic/Shader200/DebugInfoStringType.ll +++ b/test/DebugInfo/NonSemantic/Shader200/DebugInfoStringType.ll @@ -75,11 +75,11 @@ target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128" target triple = "spir64-unknown-unknown" -%"QNCA_a0$i8*$rank0$" = type { ptr, i64, i64, i64, i64, i64 } +%"QNCA_a0$ptr$rank0$" = type { ptr, i64, i64, i64, i64, i64 } @strlit = internal unnamed_addr constant [5 x i8] c"HELLO" @strlit.1 = internal unnamed_addr constant [3 x i8] c"TOM" -@"hello_world_$GREETING" = internal global %"QNCA_a0$i8*$rank0$" zeroinitializer, !dbg !2 +@"hello_world_$GREETING" = internal global %"QNCA_a0$ptr$rank0$" zeroinitializer, !dbg !2 @"hello_world_$NAME" = internal global [10 x i8] zeroinitializer, align 1, !dbg !10 @0 = internal unnamed_addr constant i32 65536, align 4 @1 = internal unnamed_addr constant i32 2, align 4 @@ -88,7 +88,7 @@ target triple = "spir64-unknown-unknown" ; Function Attrs: nounwind uwtable define void @MAIN__() local_unnamed_addr #0 !dbg !4{ %"hello_world_$GREETING_fetch.16" = load ptr, ptr @"hello_world_$GREETING", align 16, !dbg !20 - %fetch.15 = load i64, ptr getelementptr inbounds (%"QNCA_a0$i8*$rank0$", ptr @"hello_world_$GREETING", i64 0, i32 1), align 8, !dbg !20 + %fetch.15 = load i64, ptr getelementptr inbounds (%"QNCA_a0$ptr$rank0$", ptr @"hello_world_$GREETING", i64 0, i32 1), align 8, !dbg !20 call void @llvm.dbg.value(metadata i64 %fetch.15, metadata !24, metadata !DIExpression()), !dbg !21 call void @llvm.dbg.value(metadata i64 %fetch.15, metadata !31, metadata !DIExpression()), !dbg !21 call void @llvm.dbg.value(metadata i64 10, metadata !28, metadata !DIExpression()), !dbg !21 diff --git a/test/DebugInfo/NonSemantic/Shader200/DebugInfoSubrange.ll b/test/DebugInfo/NonSemantic/Shader200/DebugInfoSubrange.ll index f312542977..cd58606604 100644 --- a/test/DebugInfo/NonSemantic/Shader200/DebugInfoSubrange.ll +++ b/test/DebugInfo/NonSemantic/Shader200/DebugInfoSubrange.ll @@ -57,17 +57,16 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 target triple = "spir64-unknown-unknown" %structtype = type { [72 x i1] } -%"QNCA_a0$float" = type { float addrspace(4)*, i64, i64, i64, i64, i64, [1 x %structtype2] } +%"QNCA_a0$float" = type { ptr addrspace(4), i64, i64, i64, i64, i64, [1 x %structtype2] } %structtype2 = type { i64, i64, i64 } ; Function Attrs: noinline nounwind -define spir_kernel void @__omp_offloading_811_198142f_random_fill_sp_l25(i32 addrspace(1)* noalias %0, %structtype* byval(%structtype) %"ascast$val", [1000 x i32] addrspace(1)* noalias %"ascastB$val") #0 !kernel_arg_addr_space !9 !kernel_arg_access_qual !10 !kernel_arg_type !11 !kernel_arg_type_qual !12 !kernel_arg_base_type !11 { +define spir_kernel void @__omp_offloading_811_198142f_random_fill_sp_l25(ptr addrspace(1) noalias %0, ptr byval(%structtype) %"ascast$val", ptr addrspace(1) noalias %"ascastB$val") #0 !kernel_arg_addr_space !9 !kernel_arg_access_qual !10 !kernel_arg_type !11 !kernel_arg_type_qual !12 !kernel_arg_base_type !11 { newFuncRoot: - %.ascast = bitcast %structtype* %"ascast$val" to %"QNCA_a0$float"* - call void @llvm.dbg.value(metadata %"QNCA_a0$float"* %.ascast, metadata !13, metadata !DIExpression(DW_OP_deref)), !dbg !27 - call void @llvm.dbg.value(metadata %"QNCA_a0$float"* %.ascast, metadata !28, metadata !DIExpression(DW_OP_deref)), !dbg !42 - call void @llvm.dbg.value(metadata [1000 x i32] addrspace(1)* %"ascastB$val", metadata !47, metadata !DIExpression(DW_OP_deref)), !dbg !51 - call void @llvm.dbg.value(metadata i32 addrspace(1)* %0, metadata !54, metadata !DIExpression(DW_OP_deref)), !dbg !59 + call void @llvm.dbg.value(metadata ptr %"ascast$val", metadata !13, metadata !DIExpression(DW_OP_deref)), !dbg !27 + call void @llvm.dbg.value(metadata ptr %"ascast$val", metadata !28, metadata !DIExpression(DW_OP_deref)), !dbg !42 + call void @llvm.dbg.value(metadata ptr addrspace(1) %"ascastB$val", metadata !47, metadata !DIExpression(DW_OP_deref)), !dbg !51 + call void @llvm.dbg.value(metadata ptr addrspace(1) %0, metadata !54, metadata !DIExpression(DW_OP_deref)), !dbg !59 ret void } diff --git a/test/DebugInfo/NonSemantic/Shader200/FortranDynamicArrayExpr.ll b/test/DebugInfo/NonSemantic/Shader200/FortranDynamicArrayExpr.ll index 6191e46ad8..f3a590924c 100644 --- a/test/DebugInfo/NonSemantic/Shader200/FortranDynamicArrayExpr.ll +++ b/test/DebugInfo/NonSemantic/Shader200/FortranDynamicArrayExpr.ll @@ -44,13 +44,13 @@ source_filename = "test.f90" target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64" target triple = "spir64" -%qnca = type { i32 addrspace(4)*, i64, i64, i64, i64, i64, [1 x { i64, i64, i64 }] } +%qnca = type { ptr addrspace(4), i64, i64, i64, i64, i64, [1 x { i64, i64, i64 }] } ; Function Attrs: noinline nounwind optnone define weak dso_local spir_kernel void @TEST() #0 !dbg !5 { newFuncRoot: %0 = alloca %qnca, align 8 - call void @llvm.dbg.value(metadata %qnca* %0, metadata !8, metadata !DIExpression()), !dbg !14 + call void @llvm.dbg.value(metadata ptr %0, metadata !8, metadata !DIExpression()), !dbg !14 ret void } diff --git a/test/DebugInfo/NonSemantic/Shader200/InlineNamespace.ll b/test/DebugInfo/NonSemantic/Shader200/InlineNamespace.ll index cf1977a693..58ca1596b8 100755 --- a/test/DebugInfo/NonSemantic/Shader200/InlineNamespace.ll +++ b/test/DebugInfo/NonSemantic/Shader200/InlineNamespace.ll @@ -40,9 +40,9 @@ target triple = "spir64-unknown-unknown" ; Function Attrs: noinline nounwind optnone uwtable mustprogress define dso_local void @_Z3foov() #0 !dbg !11 { entry: - %0 = load i32, i32* @_ZN5Outer5Inner6globalE, align 4, !dbg !14 + %0 = load i32, ptr @_ZN5Outer5Inner6globalE, align 4, !dbg !14 %inc = add nsw i32 %0, 1, !dbg !14 - store i32 %inc, i32* @_ZN5Outer5Inner6globalE, align 4, !dbg !14 + store i32 %inc, ptr @_ZN5Outer5Inner6globalE, align 4, !dbg !14 ret void, !dbg !15 } diff --git a/test/DebugInfo/OpenCL100/DebugInfoSubrange.ll b/test/DebugInfo/OpenCL100/DebugInfoSubrange.ll index 740316cc6b..be42458951 100644 --- a/test/DebugInfo/OpenCL100/DebugInfoSubrange.ll +++ b/test/DebugInfo/OpenCL100/DebugInfoSubrange.ll @@ -45,17 +45,16 @@ target datalayout = "e-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f3 target triple = "spir64-unknown-unknown" %structtype = type { [72 x i1] } -%"QNCA_a0$float" = type { float addrspace(4)*, i64, i64, i64, i64, i64, [1 x %structtype2] } +%"QNCA_a0$float" = type { ptr addrspace(4), i64, i64, i64, i64, i64, [1 x %structtype2] } %structtype2 = type { i64, i64, i64 } ; Function Attrs: noinline nounwind -define spir_kernel void @__omp_offloading_811_198142f_random_fill_sp_l25(i32 addrspace(1)* noalias %0, %structtype* byval(%structtype) %"ascast$val", [1000 x i32] addrspace(1)* noalias %"ascastB$val") #0 !kernel_arg_addr_space !9 !kernel_arg_access_qual !10 !kernel_arg_type !11 !kernel_arg_type_qual !12 !kernel_arg_base_type !11 { +define spir_kernel void @__omp_offloading_811_198142f_random_fill_sp_l25(ptr addrspace(1) noalias %0, ptr byval(%structtype) %"ascast$val", ptr addrspace(1) noalias %"ascastB$val") #0 !kernel_arg_addr_space !9 !kernel_arg_access_qual !10 !kernel_arg_type !11 !kernel_arg_type_qual !12 !kernel_arg_base_type !11 { newFuncRoot: - %.ascast = bitcast %structtype* %"ascast$val" to %"QNCA_a0$float"* - call void @llvm.dbg.value(metadata %"QNCA_a0$float"* %.ascast, metadata !13, metadata !DIExpression(DW_OP_deref)), !dbg !27 - call void @llvm.dbg.value(metadata %"QNCA_a0$float"* %.ascast, metadata !28, metadata !DIExpression(DW_OP_deref)), !dbg !42 - call void @llvm.dbg.value(metadata [1000 x i32] addrspace(1)* %"ascastB$val", metadata !47, metadata !DIExpression(DW_OP_deref)), !dbg !51 - call void @llvm.dbg.value(metadata i32 addrspace(1)* %0, metadata !54, metadata !DIExpression(DW_OP_deref)), !dbg !59 + call void @llvm.dbg.value(metadata ptr %"ascast$val", metadata !13, metadata !DIExpression(DW_OP_deref)), !dbg !27 + call void @llvm.dbg.value(metadata ptr %"ascast$val", metadata !28, metadata !DIExpression(DW_OP_deref)), !dbg !42 + call void @llvm.dbg.value(metadata ptr addrspace(1) %"ascastB$val", metadata !47, metadata !DIExpression(DW_OP_deref)), !dbg !51 + call void @llvm.dbg.value(metadata ptr addrspace(1) %0, metadata !54, metadata !DIExpression(DW_OP_deref)), !dbg !59 ret void } diff --git a/test/DebugInfo/RecursiveDebugInfo.ll b/test/DebugInfo/RecursiveDebugInfo.ll index aa746e53db..fab380b628 100644 --- a/test/DebugInfo/RecursiveDebugInfo.ll +++ b/test/DebugInfo/RecursiveDebugInfo.ll @@ -55,8 +55,8 @@ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256: target triple = "spir64-unknown-unknown" %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon" = type { i8 } -%struct._ZTS8iteratorI6vectorE.iterator = type { i32 addrspace(4)* } -%struct._ZTS6vector.vector = type { i32 addrspace(4)* } +%struct._ZTS8iteratorI6vectorE.iterator = type { ptr addrspace(4) } +%struct._ZTS6vector.vector = type { ptr addrspace(4) } $_ZTS3foo = comdat any @@ -65,57 +65,50 @@ $_ZN8iteratorI6vectorEC2Ev = comdat any define weak_odr dso_local spir_kernel void @_ZTS3foo() #0 comdat !dbg !12 !kernel_arg_addr_space !10 !kernel_arg_access_qual !10 !kernel_arg_type !10 !kernel_arg_base_type !10 !kernel_arg_type_qual !10 !kernel_arg_host_accessible !10 !kernel_arg_pipe_depth !10 !kernel_arg_pipe_io !10 !kernel_arg_buffer_location !10 { entry: %0 = alloca %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon", align 1 - %1 = bitcast %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon"* %0 to i8* - call void @llvm.lifetime.start.p0i8(i64 1, i8* %1) #5 - call void @llvm.dbg.declare(metadata %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon"* %0, metadata !15, metadata !DIExpression()), !dbg !23 - %2 = addrspacecast %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon"* %0 to %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon" addrspace(4)*, !dbg !24 - call spir_func void @"_ZZZ4mainENK3$_0clERN2cl4sycl7handlerEENKUlvE_clEv"(%"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon" addrspace(4)* %2), !dbg !24 - %3 = bitcast %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon"* %0 to i8*, !dbg !23 - call void @llvm.lifetime.end.p0i8(i64 1, i8* %3) #5, !dbg !23 + call void @llvm.lifetime.start.p0(i64 1, ptr %0) #5 + call void @llvm.dbg.declare(metadata ptr %0, metadata !15, metadata !DIExpression()), !dbg !23 + %1 = addrspacecast ptr %0 to ptr addrspace(4), !dbg !24 + call spir_func void @"_ZZZ4mainENK3$_0clERN2cl4sycl7handlerEENKUlvE_clEv"(ptr addrspace(4) %1), !dbg !24 + call void @llvm.lifetime.end.p0(i64 1, ptr %0) #5, !dbg !23 ret void } ; Function Attrs: argmemonly nounwind willreturn -declare void @llvm.lifetime.start.p0i8(i64 immarg, i8* nocapture) #1 +declare void @llvm.lifetime.start.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nounwind readnone speculatable willreturn declare void @llvm.dbg.declare(metadata, metadata, metadata) #2 ; Function Attrs: inlinehint -define internal spir_func void @"_ZZZ4mainENK3$_0clERN2cl4sycl7handlerEENKUlvE_clEv"(%"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon" addrspace(4)* %this) #3 align 2 !dbg !26 { +define internal spir_func void @"_ZZZ4mainENK3$_0clERN2cl4sycl7handlerEENKUlvE_clEv"(ptr addrspace(4) %this) #3 align 2 !dbg !26 { entry: - %this.addr = alloca %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon" addrspace(4)*, align 8 + %this.addr = alloca ptr addrspace(4), align 8 %IV = alloca %struct._ZTS8iteratorI6vectorE.iterator, align 8 %V = alloca %struct._ZTS6vector.vector, align 8 - store %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon" addrspace(4)* %this, %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon" addrspace(4)** %this.addr, align 8, !tbaa !52 - call void @llvm.dbg.declare(metadata %"class._ZTSZZ4mainENK3$_0clERN2cl4sycl7handlerEEUlvE_.anon" addrspace(4)** %this.addr, metadata !28, metadata !DIExpression()), !dbg !56 - %0 = bitcast %struct._ZTS8iteratorI6vectorE.iterator* %IV to i8*, !dbg !57 - call void @llvm.lifetime.start.p0i8(i64 8, i8* %0) #5, !dbg !57 - call void @llvm.dbg.declare(metadata %struct._ZTS8iteratorI6vectorE.iterator* %IV, metadata !30, metadata !DIExpression()), !dbg !58 - %1 = addrspacecast %struct._ZTS8iteratorI6vectorE.iterator* %IV to %struct._ZTS8iteratorI6vectorE.iterator addrspace(4)*, !dbg !58 - call spir_func void @_ZN8iteratorI6vectorEC2Ev(%struct._ZTS8iteratorI6vectorE.iterator addrspace(4)* %1), !dbg !58 - %2 = bitcast %struct._ZTS6vector.vector* %V to i8*, !dbg !59 - call void @llvm.lifetime.start.p0i8(i64 8, i8* %2) #5, !dbg !59 - call void @llvm.dbg.declare(metadata %struct._ZTS6vector.vector* %V, metadata !51, metadata !DIExpression()), !dbg !60 - %3 = bitcast %struct._ZTS6vector.vector* %V to i8*, !dbg !61 - call void @llvm.lifetime.end.p0i8(i64 8, i8* %3) #5, !dbg !61 - %4 = bitcast %struct._ZTS8iteratorI6vectorE.iterator* %IV to i8*, !dbg !61 - call void @llvm.lifetime.end.p0i8(i64 8, i8* %4) #5, !dbg !61 + store ptr addrspace(4) %this, ptr %this.addr, align 8, !tbaa !52 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !28, metadata !DIExpression()), !dbg !56 + call void @llvm.lifetime.start.p0(i64 8, ptr %IV) #5, !dbg !57 + call void @llvm.dbg.declare(metadata ptr %IV, metadata !30, metadata !DIExpression()), !dbg !58 + %0 = addrspacecast ptr %IV to ptr addrspace(4), !dbg !58 + call spir_func void @_ZN8iteratorI6vectorEC2Ev(ptr addrspace(4) %0), !dbg !58 + call void @llvm.lifetime.start.p0(i64 8, ptr %V) #5, !dbg !59 + call void @llvm.dbg.declare(metadata ptr %V, metadata !51, metadata !DIExpression()), !dbg !60 + call void @llvm.lifetime.end.p0(i64 8, ptr %V) #5, !dbg !61 + call void @llvm.lifetime.end.p0(i64 8, ptr %IV) #5, !dbg !61 ret void, !dbg !61 } ; Function Attrs: argmemonly nounwind willreturn -declare void @llvm.lifetime.end.p0i8(i64 immarg, i8* nocapture) #1 +declare void @llvm.lifetime.end.p0(i64 immarg, ptr nocapture) #1 ; Function Attrs: nounwind -define linkonce_odr dso_local spir_func void @_ZN8iteratorI6vectorEC2Ev(%struct._ZTS8iteratorI6vectorE.iterator addrspace(4)* %this) unnamed_addr #4 comdat align 2 !dbg !62 { +define linkonce_odr dso_local spir_func void @_ZN8iteratorI6vectorEC2Ev(ptr addrspace(4) %this) unnamed_addr #4 comdat align 2 !dbg !62 { entry: - %this.addr = alloca %struct._ZTS8iteratorI6vectorE.iterator addrspace(4)*, align 8 - store %struct._ZTS8iteratorI6vectorE.iterator addrspace(4)* %this, %struct._ZTS8iteratorI6vectorE.iterator addrspace(4)** %this.addr, align 8, !tbaa !52 - call void @llvm.dbg.declare(metadata %struct._ZTS8iteratorI6vectorE.iterator addrspace(4)** %this.addr, metadata !64, metadata !DIExpression()), !dbg !66 - %this1 = load %struct._ZTS8iteratorI6vectorE.iterator addrspace(4)*, %struct._ZTS8iteratorI6vectorE.iterator addrspace(4)** %this.addr, align 8 - %Itr = getelementptr inbounds %struct._ZTS8iteratorI6vectorE.iterator, %struct._ZTS8iteratorI6vectorE.iterator addrspace(4)* %this1, i32 0, i32 0, !dbg !67 - store i32 addrspace(4)* null, i32 addrspace(4)* addrspace(4)* %Itr, align 8, !dbg !67, !tbaa !68 + %this.addr = alloca ptr addrspace(4), align 8 + store ptr addrspace(4) %this, ptr %this.addr, align 8, !tbaa !52 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !64, metadata !DIExpression()), !dbg !66 + %this1 = load ptr addrspace(4), ptr %this.addr, align 8 + store ptr addrspace(4) null, ptr addrspace(4) %this1, align 8, !dbg !67, !tbaa !68 ret void, !dbg !70 } diff --git a/test/DebugInfo/TransTypeCompositeCaseClass_.ll b/test/DebugInfo/TransTypeCompositeCaseClass_.ll index 684fa48f58..fb7c64c041 100644 --- a/test/DebugInfo/TransTypeCompositeCaseClass_.ll +++ b/test/DebugInfo/TransTypeCompositeCaseClass_.ll @@ -31,9 +31,9 @@ entry: %retval = alloca i32, align 4 %a = alloca %class.A, align 1 %b = alloca %struct.B, align 1 - store i32 0, i32* %retval, align 4 - call void @llvm.dbg.declare(metadata %class.A* %a, metadata !11, metadata !DIExpression()), !dbg !13 - call void @llvm.dbg.declare(metadata %struct.B* %b, metadata !14, metadata !DIExpression()), !dbg !16 + store i32 0, ptr %retval, align 4 + call void @llvm.dbg.declare(metadata ptr %a, metadata !11, metadata !DIExpression()), !dbg !13 + call void @llvm.dbg.declare(metadata ptr %b, metadata !14, metadata !DIExpression()), !dbg !16 ret i32 0, !dbg !17 } diff --git a/test/DebugInfo/UnknownBaseType.ll b/test/DebugInfo/UnknownBaseType.ll index f3d6bb5e2e..18c1066272 100644 --- a/test/DebugInfo/UnknownBaseType.ll +++ b/test/DebugInfo/UnknownBaseType.ll @@ -17,9 +17,9 @@ target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:2 target triple = "spir-unknown-unknown" ; Function Attrs: convergent nounwind -define spir_func void @foo({ float, float }* byval({ float, float }) align 4 %f) #0 !dbg !7 { +define spir_func void @foo(ptr byval({ float, float }) align 4 %f) #0 !dbg !7 { entry: - call void @llvm.dbg.declare(metadata { float, float }* %f, metadata !13, metadata !DIExpression()), !dbg !14 + call void @llvm.dbg.declare(metadata ptr %f, metadata !13, metadata !DIExpression()), !dbg !14 ret void, !dbg !14 } diff --git a/test/DebugInfo/X86/2010-04-13-PubType.ll b/test/DebugInfo/X86/2010-04-13-PubType.ll index 32a6ad67ab..b124a2e8c4 100644 --- a/test/DebugInfo/X86/2010-04-13-PubType.ll +++ b/test/DebugInfo/X86/2010-04-13-PubType.ll @@ -19,24 +19,24 @@ target triple = "spir64-unknown-unknown" %struct.X = type opaque %struct.Y = type { i32 } -define i32 @foo(%struct.X* %x, %struct.Y* %y) nounwind ssp !dbg !1 { +define i32 @foo(ptr %x, ptr %y) nounwind ssp !dbg !1 { entry: - %x_addr = alloca %struct.X* ; <%struct.X**> [#uses=1] - %y_addr = alloca %struct.Y* ; <%struct.Y**> [#uses=1] - %retval = alloca i32 ; [#uses=2] - %0 = alloca i32 ; [#uses=2] + %x_addr = alloca ptr ; [#uses=1] + %y_addr = alloca ptr ; [#uses=1] + %retval = alloca i32 ; [#uses=2] + %0 = alloca i32 ; [#uses=2] %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.declare(metadata %struct.X** %x_addr, metadata !0, metadata !DIExpression()), !dbg !13 - store %struct.X* %x, %struct.X** %x_addr - call void @llvm.dbg.declare(metadata %struct.Y** %y_addr, metadata !14, metadata !DIExpression()), !dbg !13 - store %struct.Y* %y, %struct.Y** %y_addr - store i32 0, i32* %0, align 4, !dbg !13 - %1 = load i32, i32* %0, align 4, !dbg !13 ; [#uses=1] - store i32 %1, i32* %retval, align 4, !dbg !13 + call void @llvm.dbg.declare(metadata ptr %x_addr, metadata !0, metadata !DIExpression()), !dbg !13 + store ptr %x, ptr %x_addr + call void @llvm.dbg.declare(metadata ptr %y_addr, metadata !14, metadata !DIExpression()), !dbg !13 + store ptr %y, ptr %y_addr + store i32 0, ptr %0, align 4, !dbg !13 + %1 = load i32, ptr %0, align 4, !dbg !13 ; [#uses=1] + store i32 %1, ptr %retval, align 4, !dbg !13 br label %return, !dbg !13 return: ; preds = %entry - %retval1 = load i32, i32* %retval, !dbg !13 ; [#uses=1] + %retval1 = load i32, ptr %retval, !dbg !13 ; [#uses=1] ret i32 %retval1, !dbg !15 } diff --git a/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll b/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll index e25c3f6844..281f532a39 100644 --- a/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll +++ b/test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll @@ -26,10 +26,10 @@ source_filename = "test/DebugInfo/X86/2011-09-26-GlobalVarContext.ll" ; Function Attrs: nounwind define i32 @f() #0 !dbg !8 { %LOC = alloca i32, align 4 - call void @llvm.dbg.declare(metadata i32* %LOC, metadata !11, metadata !13), !dbg !14 - %1 = load i32, i32* @GLB, align 4, !dbg !15 - store i32 %1, i32* %LOC, align 4, !dbg !15 - %2 = load i32, i32* @GLB, align 4, !dbg !16 + call void @llvm.dbg.declare(metadata ptr %LOC, metadata !11, metadata !13), !dbg !14 + %1 = load i32, ptr @GLB, align 4, !dbg !15 + store i32 %1, ptr %LOC, align 4, !dbg !15 + %2 = load i32, ptr @GLB, align 4, !dbg !16 ret i32 %2, !dbg !16 } diff --git a/test/DebugInfo/X86/2011-12-16-BadStructRef.ll b/test/DebugInfo/X86/2011-12-16-BadStructRef.ll index 9007a87caf..2d3360d15e 100644 --- a/test/DebugInfo/X86/2011-12-16-BadStructRef.ll +++ b/test/DebugInfo/X86/2011-12-16-BadStructRef.ll @@ -20,85 +20,82 @@ target triple = "spir64-unknown-unknown" ; CHECK: b_ref ; CHECK-NOT: AT_bit_size -%struct.bar = type { %struct.baz, %struct.baz* } +%struct.bar = type { %struct.baz, ptr } %struct.baz = type { i32 } -define i32 @main(i32 %argc, i8** %argv) uwtable ssp !dbg !29 { +define i32 @main(i32 %argc, ptr %argv) uwtable ssp !dbg !29 { entry: %retval = alloca i32, align 4 %argc.addr = alloca i32, align 4 - %argv.addr = alloca i8**, align 8 + %argv.addr = alloca ptr, align 8 %myBar = alloca %struct.bar, align 8 - store i32 0, i32* %retval - store i32 %argc, i32* %argc.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %argc.addr, metadata !49, metadata !DIExpression()), !dbg !50 - store i8** %argv, i8*** %argv.addr, align 8 - call void @llvm.dbg.declare(metadata i8*** %argv.addr, metadata !51, metadata !DIExpression()), !dbg !52 - call void @llvm.dbg.declare(metadata %struct.bar* %myBar, metadata !53, metadata !DIExpression()), !dbg !55 - call void @_ZN3barC1Ei(%struct.bar* %myBar, i32 1), !dbg !56 + store i32 0, ptr %retval + store i32 %argc, ptr %argc.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %argc.addr, metadata !49, metadata !DIExpression()), !dbg !50 + store ptr %argv, ptr %argv.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %argv.addr, metadata !51, metadata !DIExpression()), !dbg !52 + call void @llvm.dbg.declare(metadata ptr %myBar, metadata !53, metadata !DIExpression()), !dbg !55 + call void @_ZN3barC1Ei(ptr %myBar, i32 1), !dbg !56 ret i32 0, !dbg !57 } declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define linkonce_odr void @_ZN3barC1Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg !37 { +define linkonce_odr void @_ZN3barC1Ei(ptr %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg !37 { entry: - %this.addr = alloca %struct.bar*, align 8 + %this.addr = alloca ptr, align 8 %x.addr = alloca i32, align 4 - store %struct.bar* %this, %struct.bar** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.bar** %this.addr, metadata !58, metadata !DIExpression()), !dbg !59 - store i32 %x, i32* %x.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %x.addr, metadata !60, metadata !DIExpression()), !dbg !61 - %this1 = load %struct.bar*, %struct.bar** %this.addr - %0 = load i32, i32* %x.addr, align 4, !dbg !62 - call void @_ZN3barC2Ei(%struct.bar* %this1, i32 %0), !dbg !62 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !58, metadata !DIExpression()), !dbg !59 + store i32 %x, ptr %x.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %x.addr, metadata !60, metadata !DIExpression()), !dbg !61 + %this1 = load ptr, ptr %this.addr + %0 = load i32, ptr %x.addr, align 4, !dbg !62 + call void @_ZN3barC2Ei(ptr %this1, i32 %0), !dbg !62 ret void, !dbg !62 } -define linkonce_odr void @_ZN3barC2Ei(%struct.bar* %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg !40 { +define linkonce_odr void @_ZN3barC2Ei(ptr %this, i32 %x) unnamed_addr uwtable ssp align 2 !dbg !40 { entry: - %this.addr = alloca %struct.bar*, align 8 + %this.addr = alloca ptr, align 8 %x.addr = alloca i32, align 4 - store %struct.bar* %this, %struct.bar** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.bar** %this.addr, metadata !63, metadata !DIExpression()), !dbg !64 - store i32 %x, i32* %x.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %x.addr, metadata !65, metadata !DIExpression()), !dbg !66 - %this1 = load %struct.bar*, %struct.bar** %this.addr - %b = getelementptr inbounds %struct.bar, %struct.bar* %this1, i32 0, i32 0, !dbg !67 - %0 = load i32, i32* %x.addr, align 4, !dbg !67 - call void @_ZN3bazC1Ei(%struct.baz* %b, i32 %0), !dbg !67 - %1 = getelementptr inbounds %struct.bar, %struct.bar* %this1, i32 0, i32 1, !dbg !67 - %b2 = getelementptr inbounds %struct.bar, %struct.bar* %this1, i32 0, i32 0, !dbg !67 - store %struct.baz* %b2, %struct.baz** %1, align 8, !dbg !67 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !63, metadata !DIExpression()), !dbg !64 + store i32 %x, ptr %x.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %x.addr, metadata !65, metadata !DIExpression()), !dbg !66 + %this1 = load ptr, ptr %this.addr + %0 = load i32, ptr %x.addr, align 4, !dbg !67 + call void @_ZN3bazC1Ei(ptr %this1, i32 %0), !dbg !67 + %1 = getelementptr inbounds %struct.bar, ptr %this1, i32 0, i32 1, !dbg !67 + store ptr %this1, ptr %1, align 8, !dbg !67 ret void, !dbg !68 } -define linkonce_odr void @_ZN3bazC1Ei(%struct.baz* %this, i32 %a) unnamed_addr uwtable ssp align 2 !dbg !43 { +define linkonce_odr void @_ZN3bazC1Ei(ptr %this, i32 %a) unnamed_addr uwtable ssp align 2 !dbg !43 { entry: - %this.addr = alloca %struct.baz*, align 8 + %this.addr = alloca ptr, align 8 %a.addr = alloca i32, align 4 - store %struct.baz* %this, %struct.baz** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.baz** %this.addr, metadata !70, metadata !DIExpression()), !dbg !71 - store i32 %a, i32* %a.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !72, metadata !DIExpression()), !dbg !73 - %this1 = load %struct.baz*, %struct.baz** %this.addr - %0 = load i32, i32* %a.addr, align 4, !dbg !74 - call void @_ZN3bazC2Ei(%struct.baz* %this1, i32 %0), !dbg !74 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !70, metadata !DIExpression()), !dbg !71 + store i32 %a, ptr %a.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !72, metadata !DIExpression()), !dbg !73 + %this1 = load ptr, ptr %this.addr + %0 = load i32, ptr %a.addr, align 4, !dbg !74 + call void @_ZN3bazC2Ei(ptr %this1, i32 %0), !dbg !74 ret void, !dbg !74 } -define linkonce_odr void @_ZN3bazC2Ei(%struct.baz* %this, i32 %a) unnamed_addr nounwind uwtable ssp align 2 !dbg !46 { +define linkonce_odr void @_ZN3bazC2Ei(ptr %this, i32 %a) unnamed_addr nounwind uwtable ssp align 2 !dbg !46 { entry: - %this.addr = alloca %struct.baz*, align 8 + %this.addr = alloca ptr, align 8 %a.addr = alloca i32, align 4 - store %struct.baz* %this, %struct.baz** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.baz** %this.addr, metadata !75, metadata !DIExpression()), !dbg !76 - store i32 %a, i32* %a.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !77, metadata !DIExpression()), !dbg !78 - %this1 = load %struct.baz*, %struct.baz** %this.addr - %h = getelementptr inbounds %struct.baz, %struct.baz* %this1, i32 0, i32 0, !dbg !79 - %0 = load i32, i32* %a.addr, align 4, !dbg !79 - store i32 %0, i32* %h, align 4, !dbg !79 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !75, metadata !DIExpression()), !dbg !76 + store i32 %a, ptr %a.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !77, metadata !DIExpression()), !dbg !78 + %this1 = load ptr, ptr %this.addr + %0 = load i32, ptr %a.addr, align 4, !dbg !79 + store i32 %0, ptr %this1, align 4, !dbg !79 ret void, !dbg !80 } diff --git a/test/DebugInfo/X86/DIModuleContext.ll b/test/DebugInfo/X86/DIModuleContext.ll index 0e160e0a73..de3bee4c3d 100644 --- a/test/DebugInfo/X86/DIModuleContext.ll +++ b/test/DebugInfo/X86/DIModuleContext.ll @@ -27,7 +27,7 @@ target triple = "spir64-unknown-unknown" %struct.s = type opaque -@i = common addrspace(1) global %struct.s* null, align 8, !dbg !0 +@i = common addrspace(1) global ptr null, align 8, !dbg !0 !llvm.dbg.cu = !{!2} !llvm.module.flags = !{!11, !12} diff --git a/test/DebugInfo/X86/DW_AT_byte_size.ll b/test/DebugInfo/X86/DW_AT_byte_size.ll index b64dec128d..220145917c 100644 --- a/test/DebugInfo/X86/DW_AT_byte_size.ll +++ b/test/DebugInfo/X86/DW_AT_byte_size.ll @@ -26,14 +26,13 @@ target triple = "spir64-unknown-unknown" %struct.A = type { i32 } -define i32 @_Z3fooP1A(%struct.A* %a) nounwind uwtable ssp !dbg !5 { +define i32 @_Z3fooP1A(ptr %a) nounwind uwtable ssp !dbg !5 { entry: - %a.addr = alloca %struct.A*, align 8 - store %struct.A* %a, %struct.A** %a.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.A** %a.addr, metadata !16, metadata !DIExpression()), !dbg !17 - %0 = load %struct.A*, %struct.A** %a.addr, align 8, !dbg !18 - %b = getelementptr inbounds %struct.A, %struct.A* %0, i32 0, i32 0, !dbg !18 - %1 = load i32, i32* %b, align 4, !dbg !18 + %a.addr = alloca ptr, align 8 + store ptr %a, ptr %a.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !16, metadata !DIExpression()), !dbg !17 + %0 = load ptr, ptr %a.addr, align 8, !dbg !18 + %1 = load i32, ptr %0, align 4, !dbg !18 ret i32 %1, !dbg !18 } diff --git a/test/DebugInfo/X86/DW_AT_linkage_name.ll b/test/DebugInfo/X86/DW_AT_linkage_name.ll index c0089368c5..b269ede6f2 100644 --- a/test/DebugInfo/X86/DW_AT_linkage_name.ll +++ b/test/DebugInfo/X86/DW_AT_linkage_name.ll @@ -47,12 +47,12 @@ target triple = "spir64-unknown-unknown" %struct.A = type { i8 } ; Function Attrs: nounwind ssp uwtable -define void @_ZN1AD2Ev(%struct.A* %this) unnamed_addr #0 align 2 !dbg !17 { +define void @_ZN1AD2Ev(ptr %this) unnamed_addr #0 align 2 !dbg !17 { entry: - %this.addr = alloca %struct.A*, align 8 - store %struct.A* %this, %struct.A** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.A** %this.addr, metadata !26, metadata !DIExpression()), !dbg !28 - %this1 = load %struct.A*, %struct.A** %this.addr + %this.addr = alloca ptr, align 8 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !26, metadata !DIExpression()), !dbg !28 + %this1 = load ptr, ptr %this.addr ret void, !dbg !29 } @@ -60,13 +60,13 @@ entry: declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 ; Function Attrs: nounwind ssp uwtable -define void @_ZN1AD1Ev(%struct.A* %this) unnamed_addr #0 align 2 !dbg !18 { +define void @_ZN1AD1Ev(ptr %this) unnamed_addr #0 align 2 !dbg !18 { entry: - %this.addr = alloca %struct.A*, align 8 - store %struct.A* %this, %struct.A** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %struct.A** %this.addr, metadata !30, metadata !DIExpression()), !dbg !31 - %this1 = load %struct.A*, %struct.A** %this.addr - call void @_ZN1AD2Ev(%struct.A* %this1), !dbg !32 + %this.addr = alloca ptr, align 8 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !30, metadata !DIExpression()), !dbg !31 + %this1 = load ptr, ptr %this.addr + call void @_ZN1AD2Ev(ptr %this1), !dbg !32 ret void, !dbg !33 } @@ -74,13 +74,13 @@ entry: define void @_Z3foov() #2 !dbg !19 { entry: %a = alloca %struct.A, align 1 - call void @llvm.dbg.declare(metadata %struct.A* %a, metadata !34, metadata !DIExpression()), !dbg !35 - call void @_ZN1AC1Ei(%struct.A* %a, i32 1), !dbg !35 - call void @_ZN1AD1Ev(%struct.A* %a), !dbg !36 + call void @llvm.dbg.declare(metadata ptr %a, metadata !34, metadata !DIExpression()), !dbg !35 + call void @_ZN1AC1Ei(ptr %a, i32 1), !dbg !35 + call void @_ZN1AD1Ev(ptr %a), !dbg !36 ret void, !dbg !36 } -declare void @_ZN1AC1Ei(%struct.A*, i32) +declare void @_ZN1AC1Ei(ptr, i32) attributes #0 = { nounwind ssp uwtable } attributes #1 = { nounwind readnone } diff --git a/test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll b/test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll index 7a4f65083d..88d5830f37 100644 --- a/test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll +++ b/test/DebugInfo/X86/DW_AT_stmt_list_sec_offset.ll @@ -38,7 +38,7 @@ target triple = "spir64-unknown-unknown" define i32 @main() #0 !dbg !4 { entry: %retval = alloca i32, align 4 - store i32 0, i32* %retval + store i32 0, ptr %retval ret i32 0, !dbg !10 } diff --git a/test/DebugInfo/X86/InlinedFnLocalVar.ll b/test/DebugInfo/X86/InlinedFnLocalVar.ll index da1189a29c..6927f3f2ce 100644 --- a/test/DebugInfo/X86/InlinedFnLocalVar.ll +++ b/test/DebugInfo/X86/InlinedFnLocalVar.ll @@ -32,11 +32,11 @@ declare void @llvm.dbg.value(metadata, metadata, metadata) #0 ; Function Attrs: nounwind ssp define i32 @bar() #1 !dbg !8 { entry: - %0 = load i32, i32* @i, align 4, !dbg !11 + %0 = load i32, ptr @i, align 4, !dbg !11 tail call void @llvm.dbg.value(metadata i32 %0, metadata !13, metadata !24), !dbg !25 tail call void @llvm.dbg.declare(metadata !5, metadata !18, metadata !24), !dbg !26 %1 = mul nsw i32 %0, %0, !dbg !27 - store i32 %1, i32* @i, align 4, !dbg !11 + store i32 %1, ptr @i, align 4, !dbg !11 ret i32 %1, !dbg !28 } diff --git a/test/DebugInfo/X86/aligned_stack_var.ll b/test/DebugInfo/X86/aligned_stack_var.ll index 783778b7fe..13c6b133b3 100644 --- a/test/DebugInfo/X86/aligned_stack_var.ll +++ b/test/DebugInfo/X86/aligned_stack_var.ll @@ -34,7 +34,7 @@ target triple = "spir64-unknown-unknown" define void @_Z3runv() nounwind uwtable !dbg !5 { entry: %x = alloca i32, align 32 - call void @llvm.dbg.declare(metadata i32* %x, metadata !9, metadata !DIExpression()), !dbg !12 + call void @llvm.dbg.declare(metadata ptr %x, metadata !9, metadata !DIExpression()), !dbg !12 ret void, !dbg !13 } diff --git a/test/DebugInfo/X86/arguments.ll b/test/DebugInfo/X86/arguments.ll index 25d4a9e774..6aa2b6f6db 100644 --- a/test/DebugInfo/X86/arguments.ll +++ b/test/DebugInfo/X86/arguments.ll @@ -45,14 +45,13 @@ target triple = "spir64-unknown-unknown" %struct.foo = type { i32 } ; Function Attrs: nounwind uwtable -define void @_Z4func3fooS_(%struct.foo* %f, %struct.foo* %g) #0 !dbg !4 { +define void @_Z4func3fooS_(ptr %f, ptr %g) #0 !dbg !4 { entry: - call void @llvm.dbg.declare(metadata %struct.foo* %f, metadata !19, metadata !DIExpression()), !dbg !20 - call void @llvm.dbg.declare(metadata %struct.foo* %g, metadata !21, metadata !DIExpression()), !dbg !20 - %i = getelementptr inbounds %struct.foo, %struct.foo* %f, i32 0, i32 0, !dbg !22 - %0 = load i32, i32* %i, align 4, !dbg !22 + call void @llvm.dbg.declare(metadata ptr %f, metadata !19, metadata !DIExpression()), !dbg !20 + call void @llvm.dbg.declare(metadata ptr %g, metadata !21, metadata !DIExpression()), !dbg !20 + %0 = load i32, ptr %f, align 4, !dbg !22 %inc = add nsw i32 %0, 1, !dbg !22 - store i32 %inc, i32* %i, align 4, !dbg !22 + store i32 %inc, ptr %f, align 4, !dbg !22 ret void, !dbg !23 } diff --git a/test/DebugInfo/X86/coff_debug_info_type.ll b/test/DebugInfo/X86/coff_debug_info_type.ll index 40e613cf2a..d5fa907e85 100644 --- a/test/DebugInfo/X86/coff_debug_info_type.ll +++ b/test/DebugInfo/X86/coff_debug_info_type.ll @@ -41,7 +41,7 @@ target triple = "spir64-unknown-unknown" define i32 @main() #0 !dbg !4 { entry: %retval = alloca i32, align 4 - store i32 0, i32* %retval + store i32 0, ptr %retval ret i32 0, !dbg !10 } diff --git a/test/DebugInfo/X86/coff_relative_names.ll b/test/DebugInfo/X86/coff_relative_names.ll index 7a33025eda..c378989d43 100644 --- a/test/DebugInfo/X86/coff_relative_names.ll +++ b/test/DebugInfo/X86/coff_relative_names.ll @@ -28,7 +28,7 @@ target triple = "spir64-unknown-unknown" define i32 @main() #0 !dbg !4 { entry: %retval = alloca i32, align 4 - store i32 0, i32* %retval + store i32 0, ptr %retval ret i32 0, !dbg !10 } diff --git a/test/DebugInfo/X86/constant-loclist.ll b/test/DebugInfo/X86/constant-loclist.ll index 172490fa0a..6f7d5c9e49 100644 --- a/test/DebugInfo/X86/constant-loclist.ll +++ b/test/DebugInfo/X86/constant-loclist.ll @@ -38,14 +38,14 @@ define void @main() #0 !dbg !7 { %1 = alloca double, align 8 %2 = alloca i64, align 8 %3 = alloca i64, align 8 - store double 2.000000e+00, double* %1, align 8, !dbg !21 + store double 2.000000e+00, ptr %1, align 8, !dbg !21 call void @llvm.dbg.value(metadata i64 0, metadata !22, metadata !15), !dbg !24 call void @llvm.dbg.value(metadata i64 0, metadata !25, metadata !15), !dbg !27 call void @llvm.dbg.value(metadata double 2.000000e+00, metadata !19, metadata !15), !dbg !21 - store i64 4611686018427387904, i64* %2, align 8, !dbg !24 + store i64 4611686018427387904, ptr %2, align 8, !dbg !24 call void @llvm.dbg.value(metadata i64 4611686018427387904, metadata !22, metadata !15), !dbg !24 call void @llvm.dbg.value(metadata i64 4611686018427387904, metadata !25, metadata !15), !dbg !27 - store i64 4611686018427387904, i64* %3, align 8, !dbg !27 + store i64 4611686018427387904, ptr %3, align 8, !dbg !27 ret void, !dbg !28 } diff --git a/test/DebugInfo/X86/cu-ranges.ll b/test/DebugInfo/X86/cu-ranges.ll index c3cd0c060e..20fe5e69ea 100644 --- a/test/DebugInfo/X86/cu-ranges.ll +++ b/test/DebugInfo/X86/cu-ranges.ll @@ -49,9 +49,9 @@ target triple = "spir64-unknown-unknown" define i32 @foo(i32 %a) #0 !dbg !4 { entry: %a.addr = alloca i32, align 4 - store i32 %a, i32* %a.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %a.addr, metadata !13, metadata !DIExpression()), !dbg !14 - %0 = load i32, i32* %a.addr, align 4, !dbg !14 + store i32 %a, ptr %a.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %a.addr, metadata !13, metadata !DIExpression()), !dbg !14 + %0 = load i32, ptr %a.addr, align 4, !dbg !14 %add = add nsw i32 %0, 1, !dbg !14 ret i32 %add, !dbg !14 } @@ -63,9 +63,9 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 define i32 @bar(i32 %b) #0 !dbg !9 { entry: %b.addr = alloca i32, align 4 - store i32 %b, i32* %b.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %b.addr, metadata !15, metadata !DIExpression()), !dbg !16 - %0 = load i32, i32* %b.addr, align 4, !dbg !16 + store i32 %b, ptr %b.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %b.addr, metadata !15, metadata !DIExpression()), !dbg !16 + %0 = load i32, ptr %b.addr, align 4, !dbg !16 %add = add nsw i32 %0, 2, !dbg !16 ret i32 %add, !dbg !16 } diff --git a/test/DebugInfo/X86/dbg-byval-parameter.ll b/test/DebugInfo/X86/dbg-byval-parameter.ll index 3b17e09e5a..78909f0553 100644 --- a/test/DebugInfo/X86/dbg-byval-parameter.ll +++ b/test/DebugInfo/X86/dbg-byval-parameter.ll @@ -18,22 +18,20 @@ target triple = "spir64-unknown-unknown" %struct.Pt = type { double, double } %struct.Rect = type { %struct.Pt, %struct.Pt } -define double @foo(%struct.Rect* byval(%struct.Rect) %my_r0) nounwind ssp !dbg !1 { +define double @foo(ptr byval(%struct.Rect) %my_r0) nounwind ssp !dbg !1 { entry: - %retval = alloca double ; [#uses=2] - %0 = alloca double ; [#uses=2] + %retval = alloca double ; [#uses=2] + %0 = alloca double ; [#uses=2] %"alloca point" = bitcast i32 0 to i32 ; [#uses=0] - call void @llvm.dbg.declare(metadata %struct.Rect* %my_r0, metadata !0, metadata !DIExpression()), !dbg !15 - %1 = getelementptr inbounds %struct.Rect, %struct.Rect* %my_r0, i32 0, i32 0, !dbg !16 ; <%struct.Pt*> [#uses=1] - %2 = getelementptr inbounds %struct.Pt, %struct.Pt* %1, i32 0, i32 0, !dbg !16 ; [#uses=1] - %3 = load double, double* %2, align 8, !dbg !16 ; [#uses=1] - store double %3, double* %0, align 8, !dbg !16 - %4 = load double, double* %0, align 8, !dbg !16 ; [#uses=1] - store double %4, double* %retval, align 8, !dbg !16 + call void @llvm.dbg.declare(metadata ptr %my_r0, metadata !0, metadata !DIExpression()), !dbg !15 + %1 = load double, ptr %my_r0, align 8, !dbg !16 ; [#uses=1] + store double %1, ptr %0, align 8, !dbg !16 + %2 = load double, ptr %0, align 8, !dbg !16 ; [#uses=1] + store double %2, ptr %retval, align 8, !dbg !16 br label %return, !dbg !16 return: ; preds = %entry - %retval1 = load double, double* %retval, !dbg !16 ; [#uses=1] + %retval1 = load double, ptr %retval, !dbg !16 ; [#uses=1] ret double %retval1, !dbg !16 } diff --git a/test/DebugInfo/X86/dbg-declare-alloca.ll b/test/DebugInfo/X86/dbg-declare-alloca.ll index 66e5d12e5c..39840fb963 100644 --- a/test/DebugInfo/X86/dbg-declare-alloca.ll +++ b/test/DebugInfo/X86/dbg-declare-alloca.ll @@ -37,15 +37,15 @@ target triple = "spir64-unknown-unknown" define void @use_dbg_declare() #0 !dbg !7 { entry: %o = alloca %struct.Foo, align 8 - call void @llvm.dbg.declare(metadata %struct.Foo* %o, metadata !10, metadata !15), !dbg !16 - call void @escape_foo(%struct.Foo* %o), !dbg !17 + call void @llvm.dbg.declare(metadata ptr %o, metadata !10, metadata !15), !dbg !16 + call void @escape_foo(ptr %o), !dbg !17 ret void, !dbg !18 } ; Function Attrs: nounwind readnone speculatable declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -declare void @escape_foo(%struct.Foo*) +declare void @escape_foo(ptr) attributes #0 = { noinline nounwind uwtable } attributes #1 = { nounwind readnone speculatable } diff --git a/test/DebugInfo/X86/dbg-declare-arg.ll b/test/DebugInfo/X86/dbg-declare-arg.ll index b8316dc472..11ca766374 100644 --- a/test/DebugInfo/X86/dbg-declare-arg.ll +++ b/test/DebugInfo/X86/dbg-declare-arg.ll @@ -36,39 +36,38 @@ target triple = "spir64-unknown-unknown" %class.A = type { i32, i32, i32, i32 } -define void @_Z3fooi(%class.A* sret(%class.A) %agg.result, i32 %i) ssp !dbg !19 { +define void @_Z3fooi(ptr sret(%class.A) %agg.result, i32 %i) ssp !dbg !19 { entry: %i.addr = alloca i32, align 4 %j = alloca i32, align 4 %nrvo = alloca i1 %cleanup.dest.slot = alloca i32 - store i32 %i, i32* %i.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %i.addr, metadata !26, metadata !DIExpression()), !dbg !27 - call void @llvm.dbg.declare(metadata i32* %j, metadata !28, metadata !DIExpression()), !dbg !30 - store i32 0, i32* %j, align 4, !dbg !31 - %tmp = load i32, i32* %i.addr, align 4, !dbg !32 + store i32 %i, ptr %i.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %i.addr, metadata !26, metadata !DIExpression()), !dbg !27 + call void @llvm.dbg.declare(metadata ptr %j, metadata !28, metadata !DIExpression()), !dbg !30 + store i32 0, ptr %j, align 4, !dbg !31 + %tmp = load i32, ptr %i.addr, align 4, !dbg !32 %cmp = icmp eq i32 %tmp, 42, !dbg !32 br i1 %cmp, label %if.then, label %if.end, !dbg !32 if.then: ; preds = %entry - %tmp1 = load i32, i32* %i.addr, align 4, !dbg !33 + %tmp1 = load i32, ptr %i.addr, align 4, !dbg !33 %add = add nsw i32 %tmp1, 1, !dbg !33 - store i32 %add, i32* %j, align 4, !dbg !33 + store i32 %add, ptr %j, align 4, !dbg !33 br label %if.end, !dbg !35 if.end: ; preds = %if.then, %entry - store i1 false, i1* %nrvo, !dbg !36 - call void @llvm.dbg.declare(metadata %class.A* %agg.result, metadata !37, metadata !DIExpression()), !dbg !39 - %tmp2 = load i32, i32* %j, align 4, !dbg !40 - %x = getelementptr inbounds %class.A, %class.A* %agg.result, i32 0, i32 0, !dbg !40 - store i32 %tmp2, i32* %x, align 4, !dbg !40 - store i1 true, i1* %nrvo, !dbg !41 - store i32 1, i32* %cleanup.dest.slot - %nrvo.val = load i1, i1* %nrvo, !dbg !42 + store i1 false, ptr %nrvo, !dbg !36 + call void @llvm.dbg.declare(metadata ptr %agg.result, metadata !37, metadata !DIExpression()), !dbg !39 + %tmp2 = load i32, ptr %j, align 4, !dbg !40 + store i32 %tmp2, ptr %agg.result, align 4, !dbg !40 + store i1 true, ptr %nrvo, !dbg !41 + store i32 1, ptr %cleanup.dest.slot + %nrvo.val = load i1, ptr %nrvo, !dbg !42 br i1 %nrvo.val, label %nrvo.skipdtor, label %nrvo.unused, !dbg !42 nrvo.unused: ; preds = %if.end - call void @_ZN1AD1Ev(%class.A* %agg.result), !dbg !42 + call void @_ZN1AD1Ev(ptr %agg.result), !dbg !42 br label %nrvo.skipdtor, !dbg !42 nrvo.skipdtor: ; preds = %nrvo.unused, %if.end @@ -77,24 +76,23 @@ nrvo.skipdtor: ; preds = %nrvo.unused, %if.en declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define linkonce_odr void @_ZN1AD1Ev(%class.A* %this) unnamed_addr ssp align 2 !dbg !22 { +define linkonce_odr void @_ZN1AD1Ev(ptr %this) unnamed_addr ssp align 2 !dbg !22 { entry: - %this.addr = alloca %class.A*, align 8 - store %class.A* %this, %class.A** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !43, metadata !DIExpression()), !dbg !44 - %this1 = load %class.A*, %class.A** %this.addr - call void @_ZN1AD2Ev(%class.A* %this1), !dbg !53 + %this.addr = alloca ptr, align 8 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !43, metadata !DIExpression()), !dbg !44 + %this1 = load ptr, ptr %this.addr + call void @_ZN1AD2Ev(ptr %this1), !dbg !53 ret void, !dbg !45 } -define linkonce_odr void @_ZN1AD2Ev(%class.A* %this) unnamed_addr nounwind ssp align 2 !dbg !25 { +define linkonce_odr void @_ZN1AD2Ev(ptr %this) unnamed_addr nounwind ssp align 2 !dbg !25 { entry: - %this.addr = alloca %class.A*, align 8 - store %class.A* %this, %class.A** %this.addr, align 8 - call void @llvm.dbg.declare(metadata %class.A** %this.addr, metadata !46, metadata !DIExpression()), !dbg !47 - %this1 = load %class.A*, %class.A** %this.addr - %x = getelementptr inbounds %class.A, %class.A* %this1, i32 0, i32 0, !dbg !48 - store i32 1, i32* %x, align 4, !dbg !48 + %this.addr = alloca ptr, align 8 + store ptr %this, ptr %this.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %this.addr, metadata !46, metadata !DIExpression()), !dbg !47 + %this1 = load ptr, ptr %this.addr + store i32 1, ptr %this1, align 4, !dbg !48 ret void, !dbg !48 } diff --git a/test/DebugInfo/X86/dbg-declare.ll b/test/DebugInfo/X86/dbg-declare.ll index 6a9cf82b4d..197ad68ddf 100644 --- a/test/DebugInfo/X86/dbg-declare.ll +++ b/test/DebugInfo/X86/dbg-declare.ll @@ -31,31 +31,31 @@ target triple = "spir64-unknown-unknown" ; FIXME: There is no debug info to describe "a". -define i32 @foo(i32* %x) nounwind uwtable ssp !dbg !5 { +define i32 @foo(ptr %x) nounwind uwtable ssp !dbg !5 { entry: - %x.addr = alloca i32*, align 8 - %saved_stack = alloca i8* + %x.addr = alloca ptr, align 8 + %saved_stack = alloca ptr %cleanup.dest.slot = alloca i32 - store i32* %x, i32** %x.addr, align 8 - call void @llvm.dbg.declare(metadata i32** %x.addr, metadata !14, metadata !DIExpression()), !dbg !15 - %0 = load i32*, i32** %x.addr, align 8, !dbg !16 - %1 = load i32, i32* %0, align 4, !dbg !16 + store ptr %x, ptr %x.addr, align 8 + call void @llvm.dbg.declare(metadata ptr %x.addr, metadata !14, metadata !DIExpression()), !dbg !15 + %0 = load ptr, ptr %x.addr, align 8, !dbg !16 + %1 = load i32, ptr %0, align 4, !dbg !16 %2 = zext i32 %1 to i64, !dbg !16 - %3 = call i8* @llvm.stacksave(), !dbg !16 - store i8* %3, i8** %saved_stack, !dbg !16 + %3 = call ptr @llvm.stacksave(), !dbg !16 + store ptr %3, ptr %saved_stack, !dbg !16 %vla = alloca i8, i64 %2, align 16, !dbg !16 - call void @llvm.dbg.declare(metadata i8* %vla, metadata !18, metadata !DIExpression()), !dbg !23 - store i32 1, i32* %cleanup.dest.slot - %4 = load i8*, i8** %saved_stack, !dbg !24 - call void @llvm.stackrestore(i8* %4), !dbg !24 + call void @llvm.dbg.declare(metadata ptr %vla, metadata !18, metadata !DIExpression()), !dbg !23 + store i32 1, ptr %cleanup.dest.slot + %4 = load ptr, ptr %saved_stack, !dbg !24 + call void @llvm.stackrestore(ptr %4), !dbg !24 ret i32 0, !dbg !25 } declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -declare i8* @llvm.stacksave() nounwind +declare ptr @llvm.stacksave() nounwind -declare void @llvm.stackrestore(i8*) nounwind +declare void @llvm.stackrestore(ptr) nounwind !llvm.dbg.cu = !{!0} !llvm.module.flags = !{!27} diff --git a/test/DebugInfo/X86/dbg-file-name.ll b/test/DebugInfo/X86/dbg-file-name.ll index 0ae5912bcf..944322e2f7 100644 --- a/test/DebugInfo/X86/dbg-file-name.ll +++ b/test/DebugInfo/X86/dbg-file-name.ll @@ -18,7 +18,7 @@ target triple = "spir64-unknown-unknown" ; rdar://problem/8884898 ; CHECK: file 1 "/Users/manav/one/two" "simple.c" -declare i32 @printf(i8*, ...) nounwind +declare i32 @printf(ptr, ...) nounwind define i32 @main() nounwind !dbg !6 { ret i32 0 diff --git a/test/DebugInfo/X86/dbg-prolog-end.ll b/test/DebugInfo/X86/dbg-prolog-end.ll index 1a4441d500..d9c7257aa4 100644 --- a/test/DebugInfo/X86/dbg-prolog-end.ll +++ b/test/DebugInfo/X86/dbg-prolog-end.ll @@ -20,18 +20,18 @@ define i32 @foo(i32 %i) nounwind ssp !dbg !1 { entry: %i.addr = alloca i32, align 4 %j = alloca i32, align 4 - store i32 %i, i32* %i.addr, align 4 - call void @llvm.dbg.declare(metadata i32* %i.addr, metadata !7, metadata !DIExpression()), !dbg !8 - call void @llvm.dbg.declare(metadata i32* %j, metadata !9, metadata !DIExpression()), !dbg !11 - store i32 2, i32* %j, align 4, !dbg !12 - %tmp = load i32, i32* %j, align 4, !dbg !13 + store i32 %i, ptr %i.addr, align 4 + call void @llvm.dbg.declare(metadata ptr %i.addr, metadata !7, metadata !DIExpression()), !dbg !8 + call void @llvm.dbg.declare(metadata ptr %j, metadata !9, metadata !DIExpression()), !dbg !11 + store i32 2, ptr %j, align 4, !dbg !12 + %tmp = load i32, ptr %j, align 4, !dbg !13 %inc = add nsw i32 %tmp, 1, !dbg !13 - store i32 %inc, i32* %j, align 4, !dbg !13 - %tmp1 = load i32, i32* %j, align 4, !dbg !14 - %tmp2 = load i32, i32* %i.addr, align 4, !dbg !14 + store i32 %inc, ptr %j, align 4, !dbg !13 + %tmp1 = load i32, ptr %j, align 4, !dbg !14 + %tmp2 = load i32, ptr %i.addr, align 4, !dbg !14 %add = add nsw i32 %tmp1, %tmp2, !dbg !14 - store i32 %add, i32* %j, align 4, !dbg !14 - %tmp3 = load i32, i32* %j, align 4, !dbg !15 + store i32 %add, ptr %j, align 4, !dbg !14 + %tmp3 = load i32, ptr %j, align 4, !dbg !15 ret i32 %tmp3, !dbg !15 } @@ -43,7 +43,7 @@ declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone define i32 @main() nounwind ssp !dbg !6 { entry: %retval = alloca i32, align 4 - store i32 0, i32* %retval, !dbg !22 + store i32 0, ptr %retval, !dbg !22 %call = call i32 @foo(i32 21), !dbg !16 ret i32 %call, !dbg !16 } diff --git a/test/DebugInfo/X86/dbg-value-const-byref.ll b/test/DebugInfo/X86/dbg-value-const-byref.ll index edebc5374a..4770371f10 100644 --- a/test/DebugInfo/X86/dbg-value-const-byref.ll +++ b/test/DebugInfo/X86/dbg-value-const-byref.ll @@ -53,9 +53,9 @@ entry: call void @llvm.dbg.value(metadata i32 7, metadata !10, metadata !DIExpression()), !dbg !18 %call1 = call i32 (...) @f1() #3, !dbg !19 call void @llvm.dbg.value(metadata i32 %call1, metadata !10, metadata !DIExpression()), !dbg !19 - store i32 %call1, i32* %i, align 4, !dbg !19, !tbaa !20 - call void @llvm.dbg.value(metadata i32* %i, metadata !10, metadata !DIExpression(DW_OP_deref)), !dbg !24 - call void @f2(i32* %i) #3, !dbg !24 + store i32 %call1, ptr %i, align 4, !dbg !19, !tbaa !20 + call void @llvm.dbg.value(metadata ptr %i, metadata !10, metadata !DIExpression(DW_OP_deref)), !dbg !24 + call void @f2(ptr %i) #3, !dbg !24 ret i32 0, !dbg !25 } @@ -63,7 +63,7 @@ declare i32 @f3(i32) declare i32 @f1(...) -declare void @f2(i32*) +declare void @f2(ptr) ; Function Attrs: nounwind readnone declare void @llvm.dbg.value(metadata, metadata, metadata) #2 diff --git a/test/DebugInfo/X86/dbg-value-frame-index.ll b/test/DebugInfo/X86/dbg-value-frame-index.ll index e6cbd4593f..b6b519ebec 100644 --- a/test/DebugInfo/X86/dbg-value-frame-index.ll +++ b/test/DebugInfo/X86/dbg-value-frame-index.ll @@ -26,8 +26,8 @@ entry: br label %while.cond while.cond: - call void @llvm.dbg.value(metadata i64* %end, metadata !5, metadata !6), !dbg !7 - %call = call i1 @fn(i64* %end, i64* %end, i64* null, i8* null, i64 0, i64* null, i32* null, i8* null), !dbg !7 + call void @llvm.dbg.value(metadata ptr %end, metadata !5, metadata !6), !dbg !7 + %call = call i1 @fn(ptr %end, ptr %end, ptr null, ptr null, i64 0, ptr null, ptr null, ptr null), !dbg !7 br label %while.body while.body: @@ -42,7 +42,7 @@ while.end: ; DWARF: DW_AT_location [DW_FORM_sec_offset] ( ; DWARF-NEXT: {{.*}}, {{.*}}: DW_OP_breg7 RSP+8) -declare i1 @fn(i64*, i64*, i64*, i8*, i64, i64*, i32*, i8*) +declare i1 @fn(ptr, ptr, ptr, ptr, i64, ptr, ptr, ptr) declare void @llvm.dbg.value(metadata, metadata, metadata) !llvm.dbg.cu = !{!0} diff --git a/test/DebugInfo/X86/dbg-value-isel.ll b/test/DebugInfo/X86/dbg-value-isel.ll index a21993c98c..3e341ab43a 100644 --- a/test/DebugInfo/X86/dbg-value-isel.ll +++ b/test/DebugInfo/X86/dbg-value-isel.ll @@ -16,14 +16,14 @@ target triple = "spir64-unknown-unknown" ; PR 9879 ; CHECK: #DEBUG_VALUE: tid <- -%0 = type { i8*, i8*, i8*, i8*, i32 } +%0 = type { ptr, ptr, ptr, ptr, i32 } @sgv = internal addrspace(2) constant [1 x i8] zeroinitializer @fgv = internal addrspace(2) constant [1 x i8] zeroinitializer -define void @__OpenCL_nbt02_kernel(i32 addrspace(1)* %ip) nounwind !dbg !0 { +define void @__OpenCL_nbt02_kernel(ptr addrspace(1) %ip) nounwind !dbg !0 { entry: - call void @llvm.dbg.value(metadata i32 addrspace(1)* %ip, metadata !8, metadata !DIExpression()), !dbg !9 + call void @llvm.dbg.value(metadata ptr addrspace(1) %ip, metadata !8, metadata !DIExpression()), !dbg !9 %0 = call <4 x i32> @__amdil_get_local_id_int() nounwind %1 = extractelement <4 x i32> %0, i32 0 br label %2 @@ -71,7 +71,7 @@ get_local_size.exit: ; preds = %18 call void @llvm.dbg.value(metadata i32 %20, metadata !15, metadata !DIExpression()), !dbg !16 %tmp5 = add i32 %6, %13, !dbg !17 %tmp7 = add i32 %tmp5, %20, !dbg !17 - store i32 %tmp7, i32 addrspace(1)* %ip, align 4, !dbg !17 + store i32 %tmp7, ptr addrspace(1) %ip, align 4, !dbg !17 br label %return, !dbg !17 return: ; preds = %get_local_size.exit diff --git a/test/DebugInfo/X86/dbg-value-location.ll b/test/DebugInfo/X86/dbg-value-location.ll index a41b575c02..fc969f886a 100644 --- a/test/DebugInfo/X86/dbg-value-location.ll +++ b/test/DebugInfo/X86/dbg-value-location.ll @@ -30,10 +30,10 @@ target triple = "spir64-unknown-unknown" declare void @llvm.dbg.declare(metadata, metadata, metadata) nounwind readnone -define i32 @foo(i32 %dev, i64 %cmd, i8* %data, i32 %data2) nounwind optsize ssp !dbg !0 { +define i32 @foo(i32 %dev, i64 %cmd, ptr %data, i32 %data2) nounwind optsize ssp !dbg !0 { entry: call void @llvm.dbg.value(metadata i32 %dev, metadata !12, metadata !DIExpression()), !dbg !13 - %tmp.i = load i32, i32* @dfm, align 4, !dbg !14 + %tmp.i = load i32, ptr @dfm, align 4, !dbg !14 %cmp.i = icmp eq i32 %tmp.i, 0, !dbg !14 br i1 %cmp.i, label %if.else, label %if.end.i, !dbg !14 @@ -56,7 +56,7 @@ if.else: ; preds = %entry ret i32 0 } -declare hidden fastcc i32 @bar(i32, i32* nocapture) nounwind optsize ssp +declare hidden fastcc i32 @bar(i32, ptr nocapture) nounwind optsize ssp declare hidden fastcc i32 @bar2(i32) nounwind optsize ssp declare hidden fastcc i32 @bar3(i32) nounwind optsize ssp declare void @llvm.dbg.value(metadata, metadata, metadata) nounwind readnone diff --git a/test/DebugInfo/X86/dbg-value-range.ll b/test/DebugInfo/X86/dbg-value-range.ll index ead25c78fb..a7ac9bbaee 100644 --- a/test/DebugInfo/X86/dbg-value-range.ll +++ b/test/DebugInfo/X86/dbg-value-range.ll @@ -16,11 +16,10 @@ target triple = "spir64-unknown-unknown" %struct.a = type { i32 } -define i32 @bar(%struct.a* nocapture %b) nounwind ssp !dbg !0 { +define i32 @bar(ptr nocapture %b) nounwind ssp !dbg !0 { entry: - tail call void @llvm.dbg.value(metadata %struct.a* %b, metadata !6, metadata !DIExpression()), !dbg !13 - %tmp1 = getelementptr inbounds %struct.a, %struct.a* %b, i64 0, i32 0, !dbg !14 - %tmp2 = load i32, i32* %tmp1, align 4, !dbg !14 + tail call void @llvm.dbg.value(metadata ptr %b, metadata !6, metadata !DIExpression()), !dbg !13 + %tmp2 = load i32, ptr %b, align 4, !dbg !14 tail call void @llvm.dbg.value(metadata i32 %tmp2, metadata !11, metadata !DIExpression()), !dbg !14 %call = tail call i32 (i32) @foo(i32 %tmp2) nounwind , !dbg !18 %add = add nsw i32 %tmp2, 1, !dbg !19 diff --git a/test/DebugInfo/X86/dimodule-external-fortran.ll b/test/DebugInfo/X86/dimodule-external-fortran.ll index b555217670..080a760a55 100644 --- a/test/DebugInfo/X86/dimodule-external-fortran.ll +++ b/test/DebugInfo/X86/dimodule-external-fortran.ll @@ -58,18 +58,18 @@ define void @MAIN__() #0 !dbg !2 { alloca_0: %"var$1" = alloca [8 x i64], align 8 %"use_external_module_$X" = alloca float, align 8 - call void @llvm.dbg.declare(metadata float* %"use_external_module_$X", metadata !13, metadata !DIExpression()), !dbg !17 - %func_result = call i32 @for_set_reentrancy(i32* @0), !dbg !18 - %external_module_mp_dummy__fetch = load float, float* @external_module_mp_dummy_, align 1, !dbg !19 + call void @llvm.dbg.declare(metadata ptr %"use_external_module_$X", metadata !13, metadata !DIExpression()), !dbg !17 + %func_result = call i32 @for_set_reentrancy(ptr @0), !dbg !18 + %external_module_mp_dummy__fetch = load float, ptr @external_module_mp_dummy_, align 1, !dbg !19 %add = fadd reassoc ninf nsz arcp contract afn float 2.000000e+00, %external_module_mp_dummy__fetch, !dbg !20 - store float %add, float* %"use_external_module_$X", align 1, !dbg !19 + store float %add, ptr %"use_external_module_$X", align 1, !dbg !19 ret void, !dbg !21 } ; Function Attrs: nofree nosync nounwind readnone speculatable willreturn declare void @llvm.dbg.declare(metadata, metadata, metadata) #1 -declare i32 @for_set_reentrancy(i32*) +declare i32 @for_set_reentrancy(ptr) attributes #0 = { noinline nounwind uwtable "intel-lang"="fortran" "min-legal-vector-width"="0" "target-cpu"="x86-64" "target-features"="+cx8,+fxsr,+mmx,+sse,+sse2,+x87" } attributes #1 = { nofree nosync nounwind readnone speculatable willreturn } diff --git a/test/DebugInfo/X86/discriminator3.ll b/test/DebugInfo/X86/discriminator3.ll index 2d15ab3be3..ba33f86554 100644 --- a/test/DebugInfo/X86/discriminator3.ll +++ b/test/DebugInfo/X86/discriminator3.ll @@ -30,14 +30,14 @@ target triple = "spir64-unknown-unknown" ; Function Attrs: uwtable define void @_Z3bazi(i32) #0 !dbg !6 { %2 = alloca i32, align 4 - store i32 %0, i32* %2, align 4 - call void @llvm.dbg.declare(metadata i32* %2, metadata !10, metadata !11), !dbg !12 - %3 = load i32, i32* %2, align 4, !dbg !13 + store i32 %0, ptr %2, align 4 + call void @llvm.dbg.declare(metadata ptr %2, metadata !10, metadata !11), !dbg !12 + %3 = load i32, ptr %2, align 4, !dbg !13 %4 = icmp ne i32 %3, 0, !dbg !13 br i1 %4, label %5, label %8, !dbg !15 ;