summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-05-14 17:35:42 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-05-14 17:35:42 -0700
commit2b3c476fa08e33a0ee1633b173a7df31ecaca582 (patch)
tree5f17eed99b540a8a3d7cbfcf7aa7afd2f89da8c6 /ir.h
parent67e07ad3a33192ebf8e296c1c652d29dee467ae2 (diff)
Add ir_rvalue::variable_referenced
Diffstat (limited to 'ir.h')
-rw-r--r--ir.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/ir.h b/ir.h
index df9a8c4174..a533eee960 100644
--- a/ir.h
+++ b/ir.h
@@ -85,6 +85,14 @@ public:
return false;
}
+ /**
+ * Get the variable that is ultimately referenced by an r-value
+ */
+ virtual ir_variable *variable_referenced()
+ {
+ return NULL;
+ }
+
protected:
ir_rvalue()
{
@@ -744,6 +752,11 @@ public:
return val->is_lvalue() && !mask.has_duplicates;
}
+ /**
+ * Get the variable that is ultimately referenced by an r-value
+ */
+ virtual ir_variable *variable_referenced();
+
ir_rvalue *val;
ir_swizzle_mask mask;
};
@@ -769,6 +782,11 @@ public:
bool is_lvalue();
+ /**
+ * Get the variable that is ultimately referenced by an r-value
+ */
+ virtual ir_variable *variable_referenced();
+
enum {
ir_reference_variable,
ir_reference_array,