From e9d2d3ae17771af3e399030b1e9615715ca1aae7 Mon Sep 17 00:00:00 2001 From: Connor Abbott Date: Thu, 5 Aug 2021 16:54:17 +0200 Subject: [PATCH] ir3: Document RA-related register flags better Part-of: --- src/freedreno/ir3/ir3.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/freedreno/ir3/ir3.h b/src/freedreno/ir3/ir3.h index 53590ed8afb..723eb6567ed 100644 --- a/src/freedreno/ir3/ir3.h +++ b/src/freedreno/ir3/ir3.h @@ -126,11 +126,24 @@ struct ir3_register { /* meta-flags, for intermediate stages of IR, ie. * before register assignment is done: */ - IR3_REG_SSA = 0x4000, /* 'instr' is ptr to assigning instr */ + IR3_REG_SSA = 0x4000, /* 'def' is ptr to assigning destination */ IR3_REG_ARRAY = 0x8000, + /* Set on a use whenever the SSA value becomes dead after the current + * instruction. + */ IR3_REG_KILL = 0x10000, + + /* Similar to IR3_REG_KILL, except that if there are multiple uses of the + * same SSA value in a single instruction, this is only set on the first + * use. + */ IR3_REG_FIRST_KILL = 0x20000, + + /* Set when a destination doesn't have any uses and is dead immediately + * after the instruction. This can happen even after optimizations for + * corner cases such as destinations of atomic instructions. + */ IR3_REG_UNUSED = 0x40000, } flags;