summaryrefslogtreecommitdiffstats
path: root/src/compiler/nir/nir_metadata.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/nir/nir_metadata.c')
-rw-r--r--src/compiler/nir/nir_metadata.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/compiler/nir/nir_metadata.c b/src/compiler/nir/nir_metadata.c
index 9e1cff5a67f..f71cf432b70 100644
--- a/src/compiler/nir/nir_metadata.c
+++ b/src/compiler/nir/nir_metadata.c
@@ -31,7 +31,7 @@
*/
void
-nir_metadata_require(nir_function_impl *impl, nir_metadata required)
+nir_metadata_require(nir_function_impl *impl, nir_metadata required, ...)
{
#define NEEDS_UPDATE(X) ((required & ~impl->valid_metadata) & (X))
@@ -41,6 +41,12 @@ nir_metadata_require(nir_function_impl *impl, nir_metadata required)
nir_calc_dominance_impl(impl);
if (NEEDS_UPDATE(nir_metadata_live_ssa_defs))
nir_live_ssa_defs_impl(impl);
+ if (NEEDS_UPDATE(nir_metadata_loop_analysis)) {
+ va_list ap;
+ va_start(ap, required);
+ nir_loop_analyze_impl(impl, va_arg(ap, nir_variable_mode));
+ va_end(ap);
+ }
#undef NEEDS_UPDATE