Mesa (master): aco/ra: Remove preprocessor guards for print_regs

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jan 27 11:22:24 UTC 2021


Module: Mesa
Branch: master
Commit: 5fdc298e4b144df462c9986990a3bebac7eef1a8
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5fdc298e4b144df462c9986990a3bebac7eef1a8

Author: Tony Wasserka <tony.wasserka at gmx.de>
Date:   Tue Jan 26 16:05:32 2021 +0100

aco/ra: Remove preprocessor guards for print_regs

This debug helper isn't used anywhere by default, but compiling it anyway
ensures future refactors don't break it.

Reviewed-by: Rhys Perry <pendingchaos02 at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8719>

---

 src/amd/compiler/aco_register_allocation.cpp | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/src/amd/compiler/aco_register_allocation.cpp b/src/amd/compiler/aco_register_allocation.cpp
index 6233f0449d2..3f8b4d4996d 100644
--- a/src/amd/compiler/aco_register_allocation.cpp
+++ b/src/amd/compiler/aco_register_allocation.cpp
@@ -355,8 +355,7 @@ private:
 
 
 /* helper function for debugging */
-#if 0
-void print_regs(ra_ctx& ctx, bool vgprs, RegisterFile& reg_file)
+UNUSED void print_regs(ra_ctx& ctx, bool vgprs, RegisterFile& reg_file)
 {
    unsigned max = vgprs ? ctx.program->max_reg_demand.vgpr : ctx.program->max_reg_demand.sgpr;
    PhysRegInterval regs { vgprs ? PhysReg{256} : PhysReg{0}, max };
@@ -418,7 +417,6 @@ void print_regs(ra_ctx& ctx, bool vgprs, RegisterFile& reg_file)
    else if (prev)
       printf("]\n");
 }
-#endif
 
 
 unsigned get_subdword_operand_stride(chip_class chip, const aco_ptr<Instruction>& instr, unsigned idx, RegClass rc)



More information about the mesa-commit mailing list