* Get the variable that is ultimately referenced by an r-value
*/
virtual ir_variable *variable_referenced() const = 0;
-
- /**
- * Get the constant that is ultimately referenced by an r-value,
- * in a constant expression evaluation context.
- *
- * The offset is used when the reference is to a specific column of
- * a matrix.
- */
- virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const = 0;
};
return this->var;
}
- /**
- * Get the constant that is ultimately referenced by an r-value,
- * in a constant expression evaluation context.
- *
- * The offset is used when the reference is to a specific column of
- * a matrix.
- */
- virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
-
virtual ir_variable *whole_variable_referenced()
{
/* ir_dereference_variable objects always dereference the entire
return this->array->variable_referenced();
}
- /**
- * Get the constant that is ultimately referenced by an r-value,
- * in a constant expression evaluation context.
- *
- * The offset is used when the reference is to a specific column of
- * a matrix.
- */
- virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
-
virtual void accept(ir_visitor *v)
{
v->visit(this);
return this->record->variable_referenced();
}
- /**
- * Get the constant that is ultimately referenced by an r-value,
- * in a constant expression evaluation context.
- *
- * The offset is used when the reference is to a specific column of
- * a matrix.
- */
- virtual void constant_referenced(struct hash_table *variable_context, ir_constant *&store, int &offset) const;
-
virtual void accept(ir_visitor *v)
{
v->visit(this);
}
/**
- * \name Functions to get the constant referenced by an r-value
- *
* Get the constant that is ultimately referenced by an r-value, in a constant
* expression evaluation context.
*
* The offset is used when the reference is to a specific column of a matrix.
*/
-/*@{*/
static bool
constant_referenced(const ir_dereference *deref,
struct hash_table *variable_context,
return store != NULL;
}
-void
-ir_dereference_variable::constant_referenced(struct hash_table *variable_context,
- ir_constant *&store, int &offset) const
-{
- ::constant_referenced(this, variable_context, store, offset);
-}
-
-void
-ir_dereference_array::constant_referenced(struct hash_table *variable_context,
- ir_constant *&store, int &offset) const
-{
- ::constant_referenced(this, variable_context, store, offset);
-}
-
-void
-ir_dereference_record::constant_referenced(struct hash_table *variable_context,
- ir_constant *&store, int &offset) const
-{
- ::constant_referenced(this, variable_context, store, offset);
-}
-/*@}*/
-
ir_constant *
ir_rvalue::constant_expression_value(struct hash_table *variable_context)