[Mesa-dev] [PATCH 1/3] i965/vec4: Add invalidate_live_intervals method.
Matt Turner
mattst88 at gmail.com
Sat Nov 16 15:23:29 PST 2013
Reviewed-by: Paul Berry <stereotype441 at gmail.com>
---
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 befea0a..66a5ed8 100644
--- a/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
+++ b/src/mesa/drivers/dri/i965/brw_schedule_instructions.cpp
@@ -1443,5 +1443,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 20fbd45..e7cfab2 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 1f29e57..5cec9f9 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 d009a08..033c642 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 3adda09..5bc2f9f 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 387e3c4..95c8d9f 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 */
--
1.8.3.2
More information about the mesa-dev
mailing list