using namespace brw;
+static const bool debug = false;
+
/* Returns whether an instruction could co-issue if its immediate source were
* replaced with a GRF source.
*/
if (cfg->num_blocks != 1)
qsort(table.imm, table.len, sizeof(struct imm), compare);
-
/* Insert MOVs to load the constant values into GRFs. */
fs_reg reg(VGRF, alloc.allocate(dispatch_width / 8));
reg.stride = 0;
}
}
+ if (debug) {
+ for (int i = 0; i < table.len; i++) {
+ struct imm *imm = &table.imm[i];
+
+ printf("%.3fF - block %3d, reg %3d sub %2d, Uses: (%2d, %2d), "
+ "IP: %4d to %4d, length %4d\n",
+ imm->val,
+ imm->block->num,
+ imm->nr,
+ imm->subreg_offset,
+ imm->must_promote,
+ imm->uses_by_coissue,
+ imm->first_use_ip,
+ imm->last_use_ip,
+ imm->last_use_ip - imm->first_use_ip);
+ }
+ }
+
ralloc_free(const_ctx);
invalidate_live_intervals();