From: Jesse Natalie Date: Mon, 8 Mar 2021 22:15:05 +0000 (-0800) Subject: nir: Add a nir_after_instr_and_phis helper X-Git-Tag: upstream/21.2.3~6870 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ef0d2a5b4b93699afc5c9eaec2917630465f8455;p=platform%2Fupstream%2Fmesa.git nir: Add a nir_after_instr_and_phis helper Reviewed-by: Jason Ekstrand Part-of: --- diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index acb6877..4145a34 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -3770,6 +3770,15 @@ nir_after_phis(nir_block *block) } static inline nir_cursor +nir_after_instr_and_phis(nir_instr *instr) +{ + if (instr->type == nir_instr_type_phi) + return nir_after_phis(instr->block); + else + return nir_after_instr(instr); +} + +static inline nir_cursor nir_after_cf_node_and_phis(nir_cf_node *node) { if (node->type == nir_cf_node_block)