aco: rename DEBUG_VALIDATE to DEBUG_VALIDATE_IR

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6318>
This commit is contained in:
Samuel Pitoiset 2020-08-18 08:14:06 +02:00
parent 709dffa856
commit bc723dfda7
5 changed files with 10 additions and 10 deletions

View File

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

View File

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

View File

@ -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<uint32_t>& code);
void print_asm(Program *program, std::vector<uint32_t>& 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);

View File

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

View File

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