Lines Matching defs:inst

48 is_expression(const fs_visitor *v, const fs_inst *const inst)
50 switch (inst->opcode) {
108 return inst->mlen < 2;
110 return !is_coalescing_payload(v->alloc, inst);
112 return inst->is_send_from_grf() && !inst->has_side_effects() &&
113 !inst->is_volatile();
205 create_copy_instr(const fs_builder &bld, fs_inst *inst, fs_reg src, bool negate)
207 unsigned written = regs_written(inst);
209 DIV_ROUND_UP(inst->dst.component_size(inst->exec_size), REG_SIZE);
212 if (inst->opcode == SHADER_OPCODE_LOAD_PAYLOAD) {
215 inst->sources);
216 for (int i = 0; i < inst->header_size; i++) {
220 for (int i = inst->header_size; i < inst->sources; i++) {
221 src.type = inst->src[i].type;
225 copy = bld.LOAD_PAYLOAD(inst->dst, payload, inst->sources,
226 inst->header_size);
236 copy = bld.LOAD_PAYLOAD(inst->dst, payload, sources, 0);
238 copy = bld.MOV(inst->dst, src);
239 copy->group = inst->group;
240 copy->force_writemask_all = inst->force_writemask_all;
254 foreach_inst_in_block(fs_inst, inst, block) {
256 if (is_expression(this, inst) && !inst->is_partial_write() &&
257 ((inst->dst.file != ARF && inst->dst.file != FIXED_GRF) ||
258 inst->dst.is_null()))
265 if (!(entry->generator->dst.is_null() && !inst->dst.is_null()) &&
266 instructions_match(inst, entry->generator, &negate)) {
274 if (inst->opcode != BRW_OPCODE_MOV ||
275 (inst->opcode == BRW_OPCODE_MOV &&
276 inst->src[0].file == IMM &&
277 inst->src[0].type == BRW_REGISTER_TYPE_VF)) {
281 entry->generator = inst;
303 if (!inst->dst.is_null()) {
304 assert(inst->size_written == entry->generator->size_written);
305 assert(inst->dst.type == entry->tmp.type);
306 const fs_builder ibld(this, block, inst);
308 create_copy_instr(ibld, inst, entry->tmp, negate);
311 /* Set our iterator so that next time through the loop inst->next
315 fs_inst *prev = (fs_inst *)inst->prev;
317 inst->remove(block);
318 inst = prev;
328 if (inst->opcode == BRW_OPCODE_HALT ||
329 inst->opcode == SHADER_OPCODE_HALT_TARGET)
336 if (inst->flags_written(devinfo)) {
340 !instructions_match(inst, entry->generator, &negate))) {
353 if (regions_overlap(inst->dst, inst->size_written,