| ... | ... | @@ -3994,7 +3994,6 @@ pub const Function = struct { |
| 3994 | 3994 | names: [*]const String = &[0]String{}, |
| 3995 | 3995 | value_indices: [*]const u32 = &[0]u32{}, |
| 3996 | 3996 | strip: bool, |
| 3997 | | any_nosanitize: bool, |
| 3998 | 3997 | debug_locations: std.AutoHashMapUnmanaged(Instruction.Index, DebugLocation) = .{}, |
| 3999 | 3998 | debug_values: []const Instruction.Index = &.{}, |
| 4000 | 3999 | extra: []const u32 = &.{}, |
| ... | ... | @@ -4091,7 +4090,6 @@ pub const Function = struct { |
| 4091 | 4090 | block, |
| 4092 | 4091 | br, |
| 4093 | 4092 | br_cond, |
| 4094 | | br_cond_nosanitize, |
| 4095 | 4093 | call, |
| 4096 | 4094 | @"call fast", |
| 4097 | 4095 | cmpxchg, |
| ... | ... | @@ -4347,13 +4345,6 @@ pub const Function = struct { |
| 4347 | 4345 | else => unreachable, |
| 4348 | 4346 | }; |
| 4349 | 4347 | } |
| 4350 | | |
| 4351 | | pub fn isNosanitize(self: Tag) bool { |
| 4352 | | return switch (self) { |
| 4353 | | .br_cond_nosanitize => true, |
| 4354 | | else => false, |
| 4355 | | }; |
| 4356 | | } |
| 4357 | 4348 | }; |
| 4358 | 4349 | |
| 4359 | 4350 | pub const Index = enum(u32) { |
| ... | ... | @@ -4376,7 +4367,6 @@ pub const Function = struct { |
| 4376 | 4367 | return switch (wip.instructions.items(.tag)[@intFromEnum(self)]) { |
| 4377 | 4368 | .br, |
| 4378 | 4369 | .br_cond, |
| 4379 | | .br_cond_nosanitize, |
| 4380 | 4370 | .ret, |
| 4381 | 4371 | .@"ret void", |
| 4382 | 4372 | .@"switch", |
| ... | ... | @@ -4390,7 +4380,6 @@ pub const Function = struct { |
| 4390 | 4380 | return switch (wip.instructions.items(.tag)[@intFromEnum(self)]) { |
| 4391 | 4381 | .br, |
| 4392 | 4382 | .br_cond, |
| 4393 | | .br_cond_nosanitize, |
| 4394 | 4383 | .fence, |
| 4395 | 4384 | .ret, |
| 4396 | 4385 | .@"ret void", |
| ... | ... | @@ -4481,7 +4470,6 @@ pub const Function = struct { |
| 4481 | 4470 | .block => .label, |
| 4482 | 4471 | .br, |
| 4483 | 4472 | .br_cond, |
| 4484 | | .br_cond_nosanitize, |
| 4485 | 4473 | .fence, |
| 4486 | 4474 | .ret, |
| 4487 | 4475 | .@"ret void", |
| ... | ... | @@ -4668,7 +4656,6 @@ pub const Function = struct { |
| 4668 | 4656 | .block => .label, |
| 4669 | 4657 | .br, |
| 4670 | 4658 | .br_cond, |
| 4671 | | .br_cond_nosanitize, |
| 4672 | 4659 | .fence, |
| 4673 | 4660 | .ret, |
| 4674 | 4661 | .@"ret void", |
| ... | ... | @@ -5113,7 +5100,6 @@ pub const WipFunction = struct { |
| 5113 | 5100 | instructions: std.MultiArrayList(Instruction), |
| 5114 | 5101 | names: std.ArrayListUnmanaged(String), |
| 5115 | 5102 | strip: bool, |
| 5116 | | any_nosanitize: bool, |
| 5117 | 5103 | debug_locations: std.AutoArrayHashMapUnmanaged(Instruction.Index, DebugLocation), |
| 5118 | 5104 | debug_values: std.AutoArrayHashMapUnmanaged(Instruction.Index, void), |
| 5119 | 5105 | extra: std.ArrayListUnmanaged(u32), |
| ... | ... | @@ -5160,7 +5146,6 @@ pub const WipFunction = struct { |
| 5160 | 5146 | .instructions = .{}, |
| 5161 | 5147 | .names = .{}, |
| 5162 | 5148 | .strip = options.strip, |
| 5163 | | .any_nosanitize = false, |
| 5164 | 5149 | .debug_locations = .{}, |
| 5165 | 5150 | .debug_values = .{}, |
| 5166 | 5151 | .extra = .{}, |
| ... | ... | @@ -6452,7 +6437,7 @@ pub const WipFunction = struct { |
| 6452 | 6437 | .@"ret void", |
| 6453 | 6438 | .@"unreachable", |
| 6454 | 6439 | => {}, |
| 6455 | | .br_cond, .br_cond_nosanitize => { |
| 6440 | .br_cond => { |
| 6456 | 6441 | const extra = self.extraData(Instruction.BrCond, instruction.data); |
| 6457 | 6442 | instruction.data = wip_extra.addExtra(Instruction.BrCond{ |
| 6458 | 6443 | .cond = instructions.map(extra.cond), |
| ... | ... | @@ -6639,7 +6624,6 @@ pub const WipFunction = struct { |
| 6639 | 6624 | function.names = names.ptr; |
| 6640 | 6625 | function.value_indices = value_indices.ptr; |
| 6641 | 6626 | function.strip = self.strip; |
| 6642 | | function.any_nosanitize = self.any_nosanitize; |
| 6643 | 6627 | function.debug_locations = debug_locations; |
| 6644 | 6628 | function.debug_values = debug_values; |
| 6645 | 6629 | } |
| ... | ... | @@ -8553,7 +8537,6 @@ pub fn init(options: Options) Allocator.Error!Builder { |
| 8553 | 8537 | |
| 8554 | 8538 | try self.metadata_string_indices.append(self.gpa, 0); |
| 8555 | 8539 | assert(try self.metadataString("") == .none); |
| 8556 | | assert(try self.debugTuple(&.{}) == .empty_tuple); |
| 8557 | 8540 | |
| 8558 | 8541 | return self; |
| 8559 | 8542 | } |
| ... | ... | @@ -8951,7 +8934,6 @@ pub fn addFunctionAssumeCapacity( |
| 8951 | 8934 | .kind = .{ .function = function_index }, |
| 8952 | 8935 | }), |
| 8953 | 8936 | .strip = undefined, |
| 8954 | | .any_nosanitize = false, |
| 8955 | 8937 | }); |
| 8956 | 8938 | return function_index; |
| 8957 | 8939 | } |
| ... | ... | @@ -9599,12 +9581,6 @@ pub fn printUnbuffered( |
| 9599 | 9581 | }); |
| 9600 | 9582 | } |
| 9601 | 9583 | if (function.instructions.len > 0) { |
| 9602 | | const maybe_empty_tuple: ?u32 = if (!function.any_nosanitize) null else b: { |
| 9603 | | const gop = try metadata_formatter.map.getOrPut(self.gpa, .{ |
| 9604 | | .metadata = .empty_tuple, |
| 9605 | | }); |
| 9606 | | break :b @intCast(gop.index); |
| 9607 | | }; |
| 9608 | 9584 | var block_incoming_len: u32 = undefined; |
| 9609 | 9585 | try writer.writeAll(" {\n"); |
| 9610 | 9586 | var maybe_dbg_index: ?u32 = null; |
| ... | ... | @@ -9794,14 +9770,6 @@ pub fn printUnbuffered( |
| 9794 | 9770 | }), |
| 9795 | 9771 | } |
| 9796 | 9772 | }, |
| 9797 | | .br_cond_nosanitize => { |
| 9798 | | const extra = function.extraData(Function.Instruction.BrCond, instruction.data); |
| 9799 | | try writer.print(" br {%}, {%}, {%}", .{ |
| 9800 | | extra.cond.fmt(function_index, self), |
| 9801 | | extra.then.toInst(&function).fmt(function_index, self), |
| 9802 | | extra.@"else".toInst(&function).fmt(function_index, self), |
| 9803 | | }); |
| 9804 | | }, |
| 9805 | 9773 | .call, |
| 9806 | 9774 | .@"call fast", |
| 9807 | 9775 | .@"musttail call", |
| ... | ... | @@ -10080,9 +10048,6 @@ pub fn printUnbuffered( |
| 10080 | 10048 | if (maybe_dbg_index) |dbg_index| { |
| 10081 | 10049 | try writer.print(", !dbg !{}", .{dbg_index}); |
| 10082 | 10050 | } |
| 10083 | | if (instruction.tag.isNosanitize()) { |
| 10084 | | try writer.print(", !nosanitize !{d}", .{maybe_empty_tuple.?}); |
| 10085 | | } |
| 10086 | 10051 | try writer.writeByte('\n'); |
| 10087 | 10052 | } |
| 10088 | 10053 | try writer.writeByte('}'); |