int reg_offset;
/** Register type. BRW_REGISTER_TYPE_* */
int type;
- bool sechalf;
struct brw_reg fixed_hw_reg;
- int smear; /* -1, or a channel of the reg to smear to all channels. */
/** Value for file == BRW_IMMMEDIATE_FILE */
union {
this->imm.i = i;
}
+ bool equals(src_reg *r);
+ bool is_zero() const;
+ bool is_one() const;
+
src_reg(class vec4_visitor *v, const struct glsl_type *type);
explicit src_reg(dst_reg reg);
*/
ir_instruction *ir;
const char *annotation;
+
+ bool is_math();
};
class vec4_visitor : public ir_visitor
int first_non_payload_grf;
int *virtual_grf_def;
int *virtual_grf_use;
+
+ /**
+ * This is the size to be used for an array with an element per
+ * reg_offset
+ */
+ int virtual_grf_reg_count;
+ /** Per-virtual-grf indices into an array of size virtual_grf_reg_count */
+ int *virtual_grf_reg_map;
+
bool live_intervals_valid;
dst_reg *variable_storage(ir_variable *var);
void calculate_live_intervals();
bool dead_code_eliminate();
bool virtual_grf_interferes(int a, int b);
+ bool opt_copy_propagation();
+ bool opt_algebraic();
vec4_instruction *emit(vec4_instruction *inst);