From b241b26d11994a7a96c2bed57479f546569ce6e8 Mon Sep 17 00:00:00 2001 From: Konstantin Seurer Date: Fri, 7 Nov 2025 19:00:53 +0100 Subject: [PATCH] nir: Remove nir_def::parent_instr MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reduces the footprint of nir_def by 8B on 64-bit systems. Signed-off-by: Alyssa Rosenzweig Acked-by: Marek Olšák Part-of: --- src/compiler/nir/nir.c | 1 - src/compiler/nir/nir.h | 3 --- 2 files changed, 4 deletions(-) diff --git a/src/compiler/nir/nir.c b/src/compiler/nir/nir.c index 65201352dfb..a1143675b47 100644 --- a/src/compiler/nir/nir.c +++ b/src/compiler/nir/nir.c @@ -1663,7 +1663,6 @@ nir_def_init(nir_instr *instr, nir_def *def, unsigned num_components, unsigned bit_size) { - def->parent_instr = instr; list_inithead(&def->uses); def->num_components = num_components; def->bit_size = bit_size; diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index 7822e3de849..f3ba8222c65 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -1002,9 +1002,6 @@ nir_instr_is_last(const nir_instr *instr) } typedef struct nir_def { - /** Instruction which produces this SSA value. */ - nir_instr *parent_instr; - /** set of nir_instrs where this register is used (read from) */ struct list_head uses;