Home | History | Annotate | Download | only in i965

Lines Matching refs:imm

101 struct imm {
142 struct imm *imm;
147 static struct imm *
151 if (table->imm[i].val == val) {
152 return &table->imm[i];
158 static struct imm *
163 table->imm = reralloc(mem_ctx, table->imm, struct imm, table->size);
165 return &table->imm[table->len++];
169 * Comparator used for sorting an array of imm structures.
179 const struct imm *a = (const struct imm *)_a,
180 *b = (const struct imm *)_b;
201 table.imm = ralloc_array(const_ctx, struct imm, table.size);
217 if (inst->src[i].file != IMM ||
223 struct imm *imm = find_imm(&table, val);
225 if (imm) {
226 bblock_t *intersection = cfg_t::intersect(block, imm->block);
227 if (intersection != imm->block)
228 imm->inst = NULL;
229 imm->block = intersection;
230 imm->uses->push_tail(link(const_ctx, &inst->src[i]));
231 imm->uses_by_coissue += could_coissue(devinfo, inst);
232 imm->must_promote = imm->must_promote || must_promote_imm(devinfo, inst);
233 imm->last_use_ip = ip;
235 imm = new_imm(&table, const_ctx);
236 imm->block = block;
237 imm->inst = inst;
238 imm->uses = new(const_ctx) exec_list();
239 imm->uses->push_tail(link(const_ctx, &inst->src[i]));
240 imm->val = val;
241 imm->uses_by_coissue = could_coissue(devinfo, inst);
242 imm->must_promote = must_promote_imm(devinfo, inst);
243 imm->first_use_ip = ip;
244 imm->last_use_ip = ip;
253 struct imm *imm = &table.imm[i];
255 if (!imm->must_promote && imm->uses_by_coissue < 4) {
256 table.imm[i] = table.imm[table.len - 1];
267 qsort(table.imm, table.len, sizeof(struct imm), compare);
273 struct imm *imm = &table.imm[i];
277 exec_node *n = (imm->inst ? imm->inst :
278 imm->block->last_non_control_flow_inst()->next);
279 const fs_builder ibld = bld.at(imm->block, n).exec_all().group(1, 0);
281 ibld.MOV(reg, brw_imm_f(imm->val));
282 imm->nr = reg.nr;
283 imm->subreg_offset = reg.offset;
295 foreach_list_typed(reg_link, link, link, table.imm[i].uses) {
298 reg->nr = table.imm[i].nr;
299 reg->offset = table.imm[i].subreg_offset;
301 reg->negate = signbit(reg->f) != signbit(table.imm[i].val);
302 assert((isnan(reg->f) && isnan(table.imm[i].val)) ||
303 fabsf(reg->f) == fabs(table.imm[i].val));
309 struct imm *imm = &table.imm[i];
313 imm->val,
314 imm->block->num,
315 imm->nr,
316 imm->subreg_offset,
317 imm->must_promote,
318 imm->uses_by_coissue,
319 imm->first_use_ip,
320 imm->last_use_ip,
321 imm->last_use_ip - imm->first_use_ip);