aco: add aco_print_program() flag to print kill flags

Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Timur Kristóf <timur.kristof@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9599>
This commit is contained in:
Rhys Perry 2021-03-15 14:08:33 +00:00 committed by Marge Bot
parent 27e2f82f17
commit 8748b1c24f
2 changed files with 5 additions and 0 deletions

View file

@ -2014,6 +2014,7 @@ void collect_postasm_stats(Program *program, const std::vector<uint32_t>& code);
enum print_flags {
print_no_ssa = 0x1,
print_perf_info = 0x2,
print_kill = 0x4,
};
void aco_print_operand(const Operand *operand, FILE *output, unsigned flags=0);

View file

@ -181,6 +181,8 @@ void aco_print_operand(const Operand *operand, FILE *output, unsigned flags)
fprintf(output, "(is16bit)");
if (operand->is24bit())
fprintf(output, "(is24bit)");
if ((flags & print_kill) && operand->isKill())
fprintf(output, "(kill)");
if (!(flags & print_no_ssa))
fprintf(output, "%%%d%s", operand->tempId(), operand->isFixed() ? ":" : "");
@ -200,6 +202,8 @@ static void print_definition(const Definition *definition, FILE *output, unsigne
fprintf(output, "(nuw)");
if (definition->isNoCSE())
fprintf(output, "(noCSE)");
if ((flags & print_kill) && definition->isKill())
fprintf(output, "(kill)");
if (!(flags & print_no_ssa))
fprintf(output, "%%%d%s", definition->tempId(), definition->isFixed() ? ":" : "");