[Mesa-dev] [RFC PATCH 03/10] glsl/loops: Remove unused fields iv_scale and biv from loop_variable class.
Paul Berry
stereotype441 at gmail.com
Sat Nov 30 08:38:12 PST 2013
These fields were part of some planned optimizations that never
materialized. Remove them for now to simplify things; if we ever get
round to adding the optimizations that would require them, we can
always re-introduce them.
---
src/glsl/loop_analysis.cpp | 2 --
src/glsl/loop_analysis.h | 14 ++++----------
2 files changed, 4 insertions(+), 12 deletions(-)
diff --git a/src/glsl/loop_analysis.cpp b/src/glsl/loop_analysis.cpp
index 8d732ab..f79b388 100644
--- a/src/glsl/loop_analysis.cpp
+++ b/src/glsl/loop_analysis.cpp
@@ -388,8 +388,6 @@ loop_analysis::visit_leave(ir_loop *ir)
ir_rvalue *const inc =
get_basic_induction_increment(lv->first_assignment, ls->var_hash);
if (inc != NULL) {
- lv->iv_scale = NULL;
- lv->biv = lv->var;
lv->increment = inc;
lv->remove();
diff --git a/src/glsl/loop_analysis.h b/src/glsl/loop_analysis.h
index c7fa7ea..961ea40 100644
--- a/src/glsl/loop_analysis.h
+++ b/src/glsl/loop_analysis.h
@@ -179,20 +179,14 @@ public:
unsigned num_assignments;
/**
- * Increment values for loop induction variables
+ * Increment value for a loop induction variable
*
- * Loop induction variables have a single increment of the form
- * \c b * \c biv + \c c, where \c b and \c c are loop constants and \c i
- * is a basic loop induction variable.
+ * If this is a loop induction variable, the amount by which the variable
+ * is incremented on each iteration through the loop.
*
- * If \c iv_scale is \c NULL, 1 is used. If \c biv is the same as \c var,
- * then \c var is a basic loop induction variable.
+ * If this is not a loop induction variable, NULL.
*/
- /*@{*/
- ir_rvalue *iv_scale;
- ir_variable *biv;
ir_rvalue *increment;
- /*@}*/
inline bool is_loop_constant() const
--
1.8.4.2
More information about the mesa-dev
mailing list