diff options
author | marha <marha@users.sourceforge.net> | 2013-11-18 09:29:58 +0100 |
---|---|---|
committer | marha <marha@users.sourceforge.net> | 2013-11-18 09:29:58 +0100 |
commit | 72ba71645132923bb8e0b93f7683aef8bc485aa2 (patch) | |
tree | baeaeff7e7ce5bf65f056625b435b8d55d4a04fa /mesalib/src/glsl/ir.h | |
parent | 4d64875593956234795d9947ac1d225e5b110f0f (diff) | |
parent | 7c20de6c7fb53ed404d4df0d975328318810ce01 (diff) | |
download | vcxsrv-72ba71645132923bb8e0b93f7683aef8bc485aa2.tar.gz vcxsrv-72ba71645132923bb8e0b93f7683aef8bc485aa2.tar.bz2 vcxsrv-72ba71645132923bb8e0b93f7683aef8bc485aa2.zip |
Merge remote-tracking branch 'origin/released'
* origin/released:
libXext mesa xkeyboard-config pixman 18 nov 2013
Conflicts:
libXext/src/eat.h
Diffstat (limited to 'mesalib/src/glsl/ir.h')
-rw-r--r-- | mesalib/src/glsl/ir.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/mesalib/src/glsl/ir.h b/mesalib/src/glsl/ir.h index 2f06fb9ea..7859702ed 100644 --- a/mesalib/src/glsl/ir.h +++ b/mesalib/src/glsl/ir.h @@ -139,6 +139,16 @@ public: virtual class ir_jump * as_jump() { return NULL; } /*@}*/ + /** + * IR equality method: Return true if the referenced instruction would + * return the same value as this one. + * + * This intended to be used for CSE and algebraic optimizations, on rvalues + * in particular. No support for other instruction types (assignments, + * jumps, calls, etc.) is planned. + */ + virtual bool equals(ir_instruction *ir); + protected: ir_instruction() { @@ -1405,6 +1415,8 @@ public: return this; } + virtual bool equals(ir_instruction *ir); + virtual ir_expression *clone(void *mem_ctx, struct hash_table *ht) const; /** @@ -1739,6 +1751,8 @@ public: virtual ir_visitor_status accept(ir_hierarchical_visitor *); + virtual bool equals(ir_instruction *ir); + /** * Return a string representing the ir_texture_opcode. */ @@ -1843,6 +1857,8 @@ public: virtual ir_visitor_status accept(ir_hierarchical_visitor *); + virtual bool equals(ir_instruction *ir); + bool is_lvalue() const { return val->is_lvalue() && !mask.has_duplicates; @@ -1907,6 +1923,8 @@ public: return this; } + virtual bool equals(ir_instruction *ir); + /** * Get the variable that is ultimately referenced by an r-value */ @@ -1965,6 +1983,8 @@ public: return this; } + virtual bool equals(ir_instruction *ir); + /** * Get the variable that is ultimately referenced by an r-value */ @@ -2099,6 +2119,8 @@ public: virtual ir_visitor_status accept(ir_hierarchical_visitor *); + virtual bool equals(ir_instruction *ir); + /** * Get a particular component of a constant as a specific type * |