summaryrefslogtreecommitdiff
path: root/ir.h
diff options
context:
space:
mode:
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,