From: Timur Kristóf Date: Thu, 6 Oct 2022 15:24:14 +0000 (-0500) Subject: aco: Add ACO_DEBUG=novalidateir option. X-Git-Tag: upstream/22.3.5~1190 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a17e801a9c4d5806c2d26033e3a75c6f207aa3dd;p=platform%2Fupstream%2Fmesa.git aco: Add ACO_DEBUG=novalidateir option. This disables IR validation in debug/debugoptimized builds. Signed-off-by: Timur Kristóf Reviewed-by: Daniel Schürmann Part-of: --- diff --git a/docs/envvars.rst b/docs/envvars.rst index a1d09e4..334138b 100644 --- a/docs/envvars.rst +++ b/docs/envvars.rst @@ -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`` diff --git a/src/amd/compiler/aco_ir.cpp b/src/amd/compiler/aco_ir.cpp index f377a62..f7b0ecb 100644 --- a/src/amd/compiler/aco_ir.cpp +++ b/src/amd/compiler/aco_ir.cpp @@ -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 diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h index 64a515e..a06c3bc 100644 --- a/src/amd/compiler/aco_ir.h +++ b/src/amd/compiler/aco_ir.h @@ -55,6 +55,7 @@ enum { DEBUG_PERF_INFO = 0x80, DEBUG_LIVE_INFO = 0x100, DEBUG_FORCE_WAITDEPS = 0x200, + DEBUG_NO_VALIDATE_IR = 0x400, }; /**