From 1c263f8f4f767df0511e63377c17a95ebebba944 Mon Sep 17 00:00:00 2001 From: Matt Turner Date: Mon, 11 Nov 2013 10:33:46 -0800 Subject: [PATCH] i965/vec4: Add invalidate_live_intervals method. Reviewed-by: Paul Berry Reviewed-by: Kenneth Graunke --- src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4.cpp | 8 ++++---- src/mesa/drivers/dri/i965/brw_vec4.h | 1 + src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp | 2 +- src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp | 6 ++++++ src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp | 2 +- 6 files changed, 14 insertions(+), 7 deletions(-) diff --git a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp index a4fae0d11f1..1050d674d8c 100644 --- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp +++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp @@ -1446,5 +1446,5 @@ vec4_visitor::opt_schedule_instructions() printf("vec4 estimated execution time: %d cycles\n", sched.time); } - this->live_intervals_valid = false; + invalidate_live_intervals(); } diff --git a/src/mesa/drivers/dri/i965/brw_vec4.cpp b/src/mesa/drivers/dri/i965/brw_vec4.cpp index 20fbd4578d6..e7cfab2e368 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4.cpp @@ -343,7 +343,7 @@ vec4_visitor::dead_code_eliminate() } if (progress) - live_intervals_valid = false; + invalidate_live_intervals(); return progress; } @@ -554,7 +554,7 @@ vec4_visitor::opt_algebraic() } if (progress) - this->live_intervals_valid = false; + invalidate_live_intervals(); return progress; } @@ -1017,7 +1017,7 @@ vec4_visitor::opt_register_coalesce() } if (progress) - live_intervals_valid = false; + invalidate_live_intervals(); return progress; } @@ -1100,7 +1100,7 @@ vec4_visitor::split_virtual_grfs() } } } - this->live_intervals_valid = false; + invalidate_live_intervals(); } void diff --git a/src/mesa/drivers/dri/i965/brw_vec4.h b/src/mesa/drivers/dri/i965/brw_vec4.h index 1f29e576caf..5cec9f930e3 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4.h +++ b/src/mesa/drivers/dri/i965/brw_vec4.h @@ -352,6 +352,7 @@ public: void split_uniform_registers(); void pack_uniform_registers(); void calculate_live_intervals(); + void invalidate_live_intervals(); void split_virtual_grfs(); bool dead_code_eliminate(); bool virtual_grf_interferes(int a, int b); diff --git a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp index d009a08e8bd..033c6421f1f 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_copy_propagation.cpp @@ -362,7 +362,7 @@ vec4_visitor::opt_copy_propagation() } if (progress) - live_intervals_valid = false; + invalidate_live_intervals(); return progress; } diff --git a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp index 3adda09092d..5bc2f9f3896 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_live_variables.cpp @@ -266,6 +266,12 @@ vec4_visitor::calculate_live_intervals() this->live_intervals_valid = true; } +void +vec4_visitor::invalidate_live_intervals() +{ + live_intervals_valid = false; +} + bool vec4_visitor::virtual_grf_interferes(int a, int b) { diff --git a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp index 387e3c461ec..95c8d9f705a 100644 --- a/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp +++ b/src/mesa/drivers/dri/i965/brw_vec4_reg_allocate.cpp @@ -359,7 +359,7 @@ vec4_visitor::spill_reg(int spill_reg_nr) } } - this->live_intervals_valid = false; + invalidate_live_intervals(); } } /* namespace brw */ -- 2.30.2