aco: Add ACO_DEBUG=novalidateir option.
authorTimur Kristóf <timur.kristof@gmail.com>
Thu, 6 Oct 2022 15:24:14 +0000 (10:24 -0500)
committerMarge Bot <emma+marge@anholt.net>
Mon, 24 Oct 2022 20:14:16 +0000 (20:14 +0000)
This disables IR validation in debug/debugoptimized builds.

Signed-off-by: Timur Kristóf <timur.kristof@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/18103>

docs/envvars.rst
src/amd/compiler/aco_ir.cpp
src/amd/compiler/aco_ir.h

index a1d09e4..334138b 100644 (file)
@@ -851,6 +851,8 @@ RADV driver environment variables
    ``validateir``
       validate the ACO IR at various points of compilation (enabled by
       default for debug/debugoptimized builds)
+   ``novalidateir``
+      disable ACO IR validation in debug/debugoptimized builds
    ``validatera``
       validate register assignment of ACO IR and catches many RA bugs
    ``perfwarn``
index f377a62..f7b0ecb 100644 (file)
@@ -38,6 +38,7 @@ uint64_t debug_flags = 0;
 
 static const struct debug_control aco_debug_options[] = {{"validateir", DEBUG_VALIDATE_IR},
                                                          {"validatera", DEBUG_VALIDATE_RA},
+                                                         {"novalidateir", DEBUG_NO_VALIDATE_IR},
                                                          {"perfwarn", DEBUG_PERFWARN},
                                                          {"force-waitcnt", DEBUG_FORCE_WAITCNT},
                                                          {"force-waitdeps", DEBUG_FORCE_WAITDEPS},
@@ -59,6 +60,9 @@ init_once()
    /* enable some flags by default on debug builds */
    debug_flags |= aco::DEBUG_VALIDATE_IR;
 #endif
+
+   if (debug_flags & aco::DEBUG_NO_VALIDATE_IR)
+      debug_flags &= ~aco::DEBUG_VALIDATE_IR;
 }
 
 void
index 64a515e..a06c3bc 100644 (file)
@@ -55,6 +55,7 @@ enum {
    DEBUG_PERF_INFO = 0x80,
    DEBUG_LIVE_INFO = 0x100,
    DEBUG_FORCE_WAITDEPS = 0x200,
+   DEBUG_NO_VALIDATE_IR = 0x400,
 };
 
 /**