nir,nak: update comments referencing nir_metadata_preserve

in prep for removing this method.

Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Georg Lehmann <dadschoorse@gmail.com>
Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33722>
This commit is contained in:
Alyssa Rosenzweig 2025-02-24 15:20:21 -05:00 committed by Marge Bot
parent ff94b155ab
commit 24d088104f
3 changed files with 5 additions and 8 deletions

View file

@ -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;

View file

@ -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)

View file

@ -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);