From 4653fc4bb4b101ca6a937ad97a6691515cae0fb7 Mon Sep 17 00:00:00 2001 From: antlilja Date: Mon, 19 Feb 2024 22:51:19 +0100 Subject: [PATCH] LLVM Builder: Add dbg.declare and dbg.value intrinsics --- src/codegen/llvm/Builder.zig | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/codegen/llvm/Builder.zig b/src/codegen/llvm/Builder.zig index c40d12ed63..4f08ba88f4 100644 --- a/src/codegen/llvm/Builder.zig +++ b/src/codegen/llvm/Builder.zig @@ -2723,6 +2723,10 @@ pub const Intrinsic = enum { @"threadlocal.address", vscale, + // Debug + @"dbg.declare", + @"dbg.value", + // AMDGPU @"amdgcn.workitem.id.x", @"amdgcn.workitem.id.y", @@ -3817,6 +3821,25 @@ pub const Intrinsic = enum { .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, }, + .@"dbg.declare" = .{ + .ret_len = 0, + .params = &.{ + .{ .kind = .{ .type = .metadata } }, + .{ .kind = .{ .type = .metadata } }, + .{ .kind = .{ .type = .metadata } }, + }, + .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, + }, + .@"dbg.value" = .{ + .ret_len = 0, + .params = &.{ + .{ .kind = .{ .type = .metadata } }, + .{ .kind = .{ .type = .metadata } }, + .{ .kind = .{ .type = .metadata } }, + }, + .attrs = &.{ .nocallback, .nofree, .nosync, .nounwind, .speculatable, .willreturn, .{ .memory = Attribute.Memory.all(.none) } }, + }, + .@"amdgcn.workitem.id.x" = .{ .ret_len = 1, .params = &.{