| ... | ... | @@ -109,13 +109,8 @@ frame_locs: std.MultiArrayList(Mir.FrameLoc) = .{}, |
| 109 | 109 | /// Debug field, used to find bugs in the compiler. |
| 110 | 110 | air_bookkeeping: @TypeOf(air_bookkeeping_init) = air_bookkeeping_init, |
| 111 | 111 | |
| 112 | | /// For mir debug info, maps a mir index to a air index |
| 113 | | mir_to_air_map: @TypeOf(mir_to_air_map_init) = mir_to_air_map_init, |
| 114 | | |
| 115 | 112 | const air_bookkeeping_init = if (std.debug.runtime_safety) @as(usize, 0) else {}; |
| 116 | 113 | |
| 117 | | const mir_to_air_map_init = if (builtin.mode == .Debug) std.AutoHashMapUnmanaged(Mir.Inst.Index, Air.Inst.Index){} else {}; |
| 118 | | |
| 119 | 114 | const FrameAddr = struct { index: FrameIndex, off: i32 = 0 }; |
| 120 | 115 | const RegisterOffset = struct { reg: Register, off: i32 = 0 }; |
| 121 | 116 | const SymbolOffset = struct { sym: u32, off: i32 = 0 }; |
| ... | ... | @@ -837,7 +832,6 @@ pub fn generate( |
| 837 | 832 | function.exitlude_jump_relocs.deinit(gpa); |
| 838 | 833 | function.mir_instructions.deinit(gpa); |
| 839 | 834 | function.mir_extra.deinit(gpa); |
| 840 | | if (builtin.mode == .Debug) function.mir_to_air_map.deinit(gpa); |
| 841 | 835 | } |
| 842 | 836 | |
| 843 | 837 | wip_mir_log.debug("{}:", .{function.fmtDecl(func.owner_decl)}); |
| ... | ... | @@ -1906,11 +1900,6 @@ fn genBody(self: *Self, body: []const Air.Inst.Index) InnerError!void { |
| 1906 | 1900 | const air_tags = self.air.instructions.items(.tag); |
| 1907 | 1901 | |
| 1908 | 1902 | for (body) |inst| { |
| 1909 | | if (builtin.mode == .Debug) { |
| 1910 | | const mir_inst: Mir.Inst.Index = @intCast(self.mir_instructions.len); |
| 1911 | | try self.mir_to_air_map.put(self.gpa, mir_inst, inst); |
| 1912 | | } |
| 1913 | | |
| 1914 | 1903 | if (self.liveness.isUnused(inst) and !self.air.mustLower(inst, ip)) continue; |
| 1915 | 1904 | wip_mir_log.debug("{}", .{self.fmtAir(inst)}); |
| 1916 | 1905 | verbose_tracking_log.debug("{}", .{self.fmtTracking()}); |