From 24d088104fc869d25c6ad730ae58b3171c365385 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Mon, 24 Feb 2025 15:20:21 -0500 Subject: [PATCH] nir,nak: update comments referencing nir_metadata_preserve in prep for removing this method. Signed-off-by: Alyssa Rosenzweig Reviewed-by: Georg Lehmann Reviewed-by: Faith Ekstrand Part-of: --- src/compiler/nir/nir.h | 7 ++----- src/compiler/nir/nir_metadata.c | 4 ++-- src/nouveau/compiler/nak_nir_lower_cf.c | 2 +- 3 files changed, 5 insertions(+), 8 deletions(-) diff --git a/src/compiler/nir/nir.h b/src/compiler/nir/nir.h index f573fb1ab15..f14c9a49237 100644 --- a/src/compiler/nir/nir.h +++ b/src/compiler/nir/nir.h @@ -3286,8 +3286,7 @@ typedef enum { */ nir_metadata_live_defs = 0x4, - /** A dummy metadata value to track when a pass forgot to call - * nir_metadata_preserve. + /** A dummy metadata value to track when a pass forgot to preserve metadata. * * A pass should always clear this value even if it doesn't make any * progress to indicate that it thought about preserving metadata. @@ -3348,9 +3347,7 @@ typedef enum { /** All metadata * * This includes all nir_metadata flags except not_properly_reset. Passes - * which do not change the shader in any way should call - * - * nir_metadata_preserve(impl, nir_metadata_all); + * which do not change the shader in any way should use this. */ nir_metadata_all = ~nir_metadata_not_properly_reset, } nir_metadata; diff --git a/src/compiler/nir/nir_metadata.c b/src/compiler/nir/nir_metadata.c index b4c6b76fda3..24176dd6171 100644 --- a/src/compiler/nir/nir_metadata.c +++ b/src/compiler/nir/nir_metadata.c @@ -143,7 +143,7 @@ nir_metadata_invalidate(nir_shader *shader) * Make sure passes properly invalidate metadata (part 1). * * Call this before running a pass to set a bogus metadata flag, which will - * only be preserved if the pass forgets to call nir_metadata_preserve(). + * only be preserved if the pass forgets to call nir_progress(). */ void nir_metadata_set_validation_flag(nir_shader *shader) @@ -158,7 +158,7 @@ nir_metadata_set_validation_flag(nir_shader *shader) * * Call this after a pass makes progress to verify that the bogus metadata set by * the earlier function was properly thrown away. Note that passes may not call - * nir_metadata_preserve() if they don't actually make any changes at all. + * nir_progress() if they don't actually make any changes at all. */ void nir_metadata_check_validation_flag(nir_shader *shader) diff --git a/src/nouveau/compiler/nak_nir_lower_cf.c b/src/nouveau/compiler/nak_nir_lower_cf.c index 0c17c31d3a3..d1e20cf52ea 100644 --- a/src/nouveau/compiler/nak_nir_lower_cf.c +++ b/src/nouveau/compiler/nak_nir_lower_cf.c @@ -472,7 +472,7 @@ lower_cf_func(nir_function *func) /* Now sort by reverse PDFS and restore SSA * * Note: Since we created a new nir_function_impl, there is no metadata, - * dirty or otherwise, so we have no need to call nir_metadata_preserve(). + * dirty or otherwise, so we have no need to call nir_progress(). */ nir_sort_unstructured_blocks(new_impl); nir_repair_ssa_impl(new_impl);