From: Samuel Pitoiset Date: Tue, 18 Aug 2020 06:14:06 +0000 (+0200) Subject: aco: rename DEBUG_VALIDATE to DEBUG_VALIDATE_IR X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc723dfda7b3e6b4671b068785c50bd49aa27ee8;p=mesa.git aco: rename DEBUG_VALIDATE to DEBUG_VALIDATE_IR Signed-off-by: Samuel Pitoiset Reviewed-by: Rhys Perry Part-of: --- diff --git a/src/amd/compiler/aco_interface.cpp b/src/amd/compiler/aco_interface.cpp index b95c4507c80..95c2ac1be08 100644 --- a/src/amd/compiler/aco_interface.cpp +++ b/src/amd/compiler/aco_interface.cpp @@ -45,10 +45,10 @@ static radv_compiler_statistic_info statistic_infos[] = { static void validate(aco::Program *program) { - if (!(aco::debug_flags & aco::DEBUG_VALIDATE)) + if (!(aco::debug_flags & aco::DEBUG_VALIDATE_IR)) return; - bool is_valid = aco::validate(program, stderr); + bool is_valid = aco::validate_ir(program, stderr); assert(is_valid); } diff --git a/src/amd/compiler/aco_ir.cpp b/src/amd/compiler/aco_ir.cpp index c028e1788c1..2a0a500a7b6 100644 --- a/src/amd/compiler/aco_ir.cpp +++ b/src/amd/compiler/aco_ir.cpp @@ -31,7 +31,7 @@ namespace aco { uint64_t debug_flags = 0; static const struct debug_control aco_debug_options[] = { - {"validateir", DEBUG_VALIDATE}, + {"validateir", DEBUG_VALIDATE_IR}, {"validatera", DEBUG_VALIDATE_RA}, {"perfwarn", DEBUG_PERFWARN}, {NULL, 0} @@ -45,7 +45,7 @@ static void init_once() #ifndef NDEBUG /* enable some flags by default on debug builds */ - debug_flags |= aco::DEBUG_VALIDATE; + debug_flags |= aco::DEBUG_VALIDATE_IR; #endif } diff --git a/src/amd/compiler/aco_ir.h b/src/amd/compiler/aco_ir.h index 1d6220ef928..62f9303e793 100644 --- a/src/amd/compiler/aco_ir.h +++ b/src/amd/compiler/aco_ir.h @@ -46,7 +46,7 @@ namespace aco { extern uint64_t debug_flags; enum { - DEBUG_VALIDATE = 0x1, + DEBUG_VALIDATE_IR = 0x1, DEBUG_VALIDATE_RA = 0x2, DEBUG_PERFWARN = 0x4, }; @@ -1665,7 +1665,7 @@ void insert_NOPs(Program* program); unsigned emit_program(Program* program, std::vector& code); void print_asm(Program *program, std::vector& binary, unsigned exec_size, std::ostream& out); -bool validate(Program* program, FILE *output); +bool validate_ir(Program* program, FILE *output); bool validate_ra(Program* program, const struct radv_nir_compiler_options *options, FILE *output); #ifndef NDEBUG void perfwarn(bool cond, const char *msg, Instruction *instr=NULL); diff --git a/src/amd/compiler/aco_validate.cpp b/src/amd/compiler/aco_validate.cpp index 97967aac9c1..e9cfe0b4355 100644 --- a/src/amd/compiler/aco_validate.cpp +++ b/src/amd/compiler/aco_validate.cpp @@ -46,7 +46,7 @@ void perfwarn(bool cond, const char *msg, Instruction *instr) } #endif -bool validate(Program* program, FILE *output) +bool validate_ir(Program* program, FILE *output) { bool is_valid = true; auto check = [&output, &is_valid](bool check, const char * msg, aco::Instruction * instr) -> void { diff --git a/src/amd/compiler/tests/helpers.cpp b/src/amd/compiler/tests/helpers.cpp index 58539db074b..3e2f697814e 100644 --- a/src/amd/compiler/tests/helpers.cpp +++ b/src/amd/compiler/tests/helpers.cpp @@ -146,7 +146,7 @@ void finish_validator_test() finish_program(program.get()); aco_print_program(program.get(), output); fprintf(output, "Validation results:\n"); - if (aco::validate(program.get(), output)) + if (aco::validate_ir(program.get(), output)) fprintf(output, "Validation passed\n"); else fprintf(output, "Validation failed\n"); @@ -155,12 +155,12 @@ void finish_validator_test() void finish_opt_test() { finish_program(program.get()); - if (!aco::validate(program.get(), output)) { + if (!aco::validate_ir(program.get(), output)) { fail_test("Validation before optimization failed"); return; } aco::optimize(program.get()); - if (!aco::validate(program.get(), output)) { + if (!aco::validate_ir(program.get(), output)) { fail_test("Validation after optimization failed"); return; }