Commit 4653fc4bb4

antlilja <liljaanton2001@gmail.com>
2024-02-19 22:51:19
LLVM Builder: Add dbg.declare and dbg.value intrinsics
1 parent 1502959
Changed files (1)
src
codegen
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 = &.{