assign_common_binding_table_offsets(next_binding_table_offset);
}
+void
+fs_visitor::calculate_register_pressure()
+{
+ calculate_live_intervals();
+
+ int num_instructions = 0;
+ foreach_list(node, &this->instructions) {
+ ++num_instructions;
+ }
+
+ regs_live_at_ip = rzalloc_array(mem_ctx, int, num_instructions);
+
+ for (int reg = 0; reg < virtual_grf_count; reg++) {
+ for (int ip = virtual_grf_start[reg]; ip <= virtual_grf_end[reg]; ip++)
+ regs_live_at_ip[ip] += virtual_grf_sizes[reg];
+ }
+}
+
bool
fs_visitor::run()
{
void setup_pull_constants();
void invalidate_live_intervals();
void calculate_live_intervals();
+ void calculate_register_pressure();
bool opt_algebraic();
bool opt_cse();
bool opt_cse_local(bblock_t *block, exec_list *aeb);
int *virtual_grf_end;
brw::fs_live_variables *live_intervals;
+ int *regs_live_at_ip;
+
/* This is the map from UNIFORM hw_reg + reg_offset as generated by
* the visitor to the packed uniform number after
* remove_dead_constants() that represents the actual uploaded
this->virtual_grf_start = NULL;
this->virtual_grf_end = NULL;
this->live_intervals = NULL;
+ this->regs_live_at_ip = NULL;
this->params_remap = NULL;
this->nr_params_remap = 0;