authorgravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2023-11-16 20:40:32+11:00
committergravatar for 4678790+dweiller@users.noreply.github.comDominic <4678790+dweiller@users.noreply.github.com> 2024-01-09 14:42:11+11:00
log063d55c50479659b171f72ac2ba2d13197f12138
tree127219c0cd3dd1eecbab094175651d6012b07b6d
parent8c9efc95a1892276fee910546a019bee37b3726d

zir: remove unused zir as instruction


4 files changed, 0 insertions(+), 17 deletions(-)

src/AstGen.zig-1
......@@ -2556,7 +2556,6 @@ fn addEnsureResult(gz: *GenZir, maybe_unused_result: Zir.Inst.Ref, statement: As
25562556 .vector_type,
25572557 .indexable_ptr_len,
25582558 .anyframe_type,
2559 .as,
25602559 .as_node,
25612560 .as_shift_operand,
25622561 .bit_and,
src/Sema.zig-9
......@@ -1018,7 +1018,6 @@ fn analyzeBodyInner(
10181018 .array_type => try sema.zirArrayType(block, inst),
10191019 .array_type_sentinel => try sema.zirArrayTypeSentinel(block, inst),
10201020 .vector_type => try sema.zirVectorType(block, inst),
1021 .as => try sema.zirAs(block, inst),
10221021 .as_node => try sema.zirAsNode(block, inst),
10231022 .as_shift_operand => try sema.zirAsShiftOperand(block, inst),
10241023 .bit_and => try sema.zirBitwise(block, inst, .bit_and),
......@@ -9794,14 +9793,6 @@ fn zirParamAnytype(
97949793 sema.inst_map.putAssumeCapacity(inst, .generic_poison);
97959794}
97969795
9797fn zirAs(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Inst.Ref {
9798 const tracy = trace(@src());
9799 defer tracy.end();
9800
9801 const bin_inst = sema.code.instructions.items(.data)[@intFromEnum(inst)].bin;
9802 return sema.analyzeAs(block, sema.src, bin_inst.lhs, bin_inst.rhs, false);
9803}
9804
98059796fn zirAsNode(sema: *Sema, block: *Block, inst: Zir.Inst.Index) CompileError!Air.Inst.Ref {
98069797 const tracy = trace(@src());
98079798 defer tracy.end();
src/Zir.zig-6
......@@ -277,9 +277,6 @@ pub const Inst = struct {
277277 /// Create a `anyframe->T` type.
278278 /// Uses the `un_node` field.
279279 anyframe_type,
280 /// Type coercion. No source location attached.
281 /// Uses the `bin` field.
282 as,
283280 /// Type coercion to the function's return type.
284281 /// Uses the `pl_node` field. Payload is `As`. AST node could be many things.
285282 as_node,
......@@ -1083,7 +1080,6 @@ pub const Inst = struct {
10831080 .vector_elem_type,
10841081 .indexable_ptr_len,
10851082 .anyframe_type,
1086 .as,
10871083 .as_node,
10881084 .as_shift_operand,
10891085 .bit_and,
......@@ -1396,7 +1392,6 @@ pub const Inst = struct {
13961392 .vector_elem_type,
13971393 .indexable_ptr_len,
13981394 .anyframe_type,
1399 .as,
14001395 .as_node,
14011396 .as_shift_operand,
14021397 .bit_and,
......@@ -1629,7 +1624,6 @@ pub const Inst = struct {
16291624 .vector_elem_type = .un_node,
16301625 .indexable_ptr_len = .un_node,
16311626 .anyframe_type = .un_node,
1632 .as = .bin,
16331627 .as_node = .pl_node,
16341628 .as_shift_operand = .pl_node,
16351629 .bit_and = .pl_node,
src/print_zir.zig-1
......@@ -199,7 +199,6 @@ const Writer = struct {
199199 const tag = tags[@intFromEnum(inst)];
200200 try stream.print("= {s}(", .{@tagName(tags[@intFromEnum(inst)])});
201201 switch (tag) {
202 .as,
203202 .store,
204203 .store_to_inferred_ptr,
205204 => try self.writeBin(stream, inst),