nir: add nir_def_block helper
Another common composition. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Reviewed-by: Emma Anholt <emma@anholt.net> Reviewed-by: Marek Olšák <maraeo@gmail.com> Acked-by: Karol Herbst <kherbst@redhat.com> Reviewed-by: Konstantin Seurer <konstantin.seurer@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36489>
This commit is contained in:
committed by
Marge Bot
parent
3624f054f2
commit
114bf69956
@@ -1019,6 +1019,12 @@ typedef struct nir_def {
|
||||
bool loop_invariant;
|
||||
} nir_def;
|
||||
|
||||
static inline nir_block *
|
||||
nir_def_block(nir_def *def)
|
||||
{
|
||||
return def->parent_instr->block;
|
||||
}
|
||||
|
||||
typedef struct nir_src {
|
||||
/* Instruction or if-statement that consumes this value as a source. This
|
||||
* should only be accessed through nir_src_* helpers.
|
||||
|
||||
Reference in New Issue
Block a user