From 88b01f43312eeceba87a1378be5cd63bb11f167f Mon Sep 17 00:00:00 2001 From: WormHeamer Date: Mon, 4 Aug 2025 22:13:25 -0400 Subject: fix bug of lhs getting culled if same node optimized out of rhs --- ir.h | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'ir.h') diff --git a/ir.h b/ir.h index 112ab8e..799a0e0 100644 --- a/ir.h +++ b/ir.h @@ -62,20 +62,14 @@ typedef enum { const char *node_type_name(NodeType t); -#define NODE_INPUT_MAX 2 - -typedef struct { - struct Node *data[NODE_INPUT_MAX]; - ptrdiff_t len; -} NodeInputs; - -typedef DYNARR(struct Node *) NodeOutputs; +typedef DYNARR(struct Node *) NodeList; +typedef NodeList NodeInputs, NodeOutputs; typedef struct Node { + int id, refs; union { struct Node *prev_free; struct { - int id, refs; int walked; NodeType type; LexSpan src_pos; -- cgit v1.2.3