• Home
  • Raw
  • Download

Lines Matching full:clause

50 /* State of a single tuple and clause under construction */
72 /* Is this the last tuple in the clause */
106 /* Index of the constant into the clause */
139 /* Numerical state of the clause */
332 bi_lower_cubeface(bi_context *ctx, struct bi_clause_state *clause, in bi_lower_cubeface() argument
355 bi_lower_atom_c(bi_context *ctx, struct bi_clause_state *clause, in bi_lower_atom_c() argument
376 bi_lower_atom_c1(bi_context *ctx, struct bi_clause_state *clause, in bi_lower_atom_c1() argument
397 bi_lower_seg_add(bi_context *ctx, struct bi_clause_state *clause, in bi_lower_seg_add() argument
417 bi_lower_dtsel(bi_context *ctx, struct bi_clause_state *clause, in bi_lower_dtsel() argument
584 * paired instructions) can run afoul of the "no two writes on the last clause"
650 * requires workarounds in both RA and clause scheduling. in bi_reads_temps()
772 /* Counts the number of 64-bit constants required by a clause. TODO: We
777 bi_nconstants(struct bi_clause_state *clause) in bi_nconstants() argument
781 for (unsigned i = 0; i < ARRAY_SIZE(clause->consts); ++i) in bi_nconstants()
782 count_32 += clause->consts[i].constant_count; in bi_nconstants()
790 bi_space_for_more_constants(struct bi_clause_state *clause) in bi_space_for_more_constants() argument
792 return (bi_nconstants(clause) < 13 - (clause->tuple_count + 1)); in bi_space_for_more_constants()
801 bi_update_fau(struct bi_clause_state *clause, struct bi_tuple_state *tuple, in bi_update_fau() argument
868 /* Constants per clause may be limited by tuple count */ in bi_update_fau()
870 (*constant_count == 0) || bi_space_for_more_constants(clause); in bi_update_fau()
1032 * Test if an instruction would be numerically incompatible with the clause. At
1036 bi_numerically_incompatible(struct bi_clause_state *clause, bi_instr *instr) in bi_numerically_incompatible() argument
1038 return (clause->ftz != BI_FTZ_STATE_NONE) && in bi_numerically_incompatible()
1039 ((clause->ftz == BI_FTZ_STATE_ENABLE) != bi_needs_ftz(instr)); in bi_numerically_incompatible()
1050 bi_instr_schedulable(bi_instr *instr, struct bi_clause_state *clause, in bi_instr_schedulable() argument
1058 /* There can only be one message-passing instruction per clause */ in bi_instr_schedulable()
1059 if (bi_must_message(instr) && clause->message) in bi_instr_schedulable()
1069 /* Numerical properties must be compatible with the clause */ in bi_instr_schedulable()
1070 if (bi_numerically_incompatible(clause, instr)) in bi_instr_schedulable()
1074 * same clause (most likely they will not), so if a later instruction in bi_instr_schedulable()
1075 * in the clause accesses the destination, the message-passing in bi_instr_schedulable()
1083 for (unsigned i = 0; i < clause->access_count; ++i) { in bi_instr_schedulable()
1084 bi_index idx = clause->accesses[i]; in bi_instr_schedulable()
1098 for (unsigned i = 0; i < clause->access_count; ++i) { in bi_instr_schedulable()
1099 bi_index idx = clause->accesses[i]; in bi_instr_schedulable()
1109 if (!bi_update_fau(clause, tuple, instr, fma, false)) in bi_instr_schedulable()
1127 /* Last tuple in a clause can only write a single value */ in bi_instr_schedulable()
1144 (bi_nconstants(clause) < 13 - (clause->tuple_count + 2)); in bi_instr_schedulable()
1145 can_spill_to_moves &= (clause->tuple_count < 7); in bi_instr_schedulable()
1179 * later in the clause, so schedule them as late within a clause as in bi_instr_cost()
1193 bi_choose_index(struct bi_worklist st, struct bi_clause_state *clause, in bi_choose_index() argument
1203 if (!bi_instr_schedulable(instr, clause, tuple, live_after_temp, fma)) in bi_choose_index()
1223 bi_pop_instr(struct bi_clause_state *clause, struct bi_tuple_state *tuple, in bi_pop_instr() argument
1226 bi_update_fau(clause, tuple, instr, fma, true); in bi_pop_instr()
1228 assert(clause->access_count + instr->nr_srcs + instr->nr_dests <= in bi_pop_instr()
1229 ARRAY_SIZE(clause->accesses)); in bi_pop_instr()
1231 memcpy(clause->accesses + clause->access_count, instr->src, in bi_pop_instr()
1233 clause->access_count += instr->nr_srcs; in bi_pop_instr()
1235 memcpy(clause->accesses + clause->access_count, instr->dest, in bi_pop_instr()
1237 clause->access_count += instr->nr_dests; in bi_pop_instr()
1250 clause->ftz = in bi_pop_instr()
1259 struct bi_clause_state *clause, struct bi_tuple_state *tuple, in bi_take_instr() argument
1263 return bi_lower_cubeface(ctx, clause, tuple); in bi_take_instr()
1265 return bi_lower_atom_c(ctx, clause, tuple); in bi_take_instr()
1267 return bi_lower_atom_c1(ctx, clause, tuple); in bi_take_instr()
1269 return bi_lower_seg_add(ctx, clause, tuple); in bi_take_instr()
1271 return bi_lower_dtsel(ctx, clause, tuple); in bi_take_instr()
1284 bi_pop_instr(clause, tuple, mov, live_after_temp, fma); in bi_take_instr()
1294 unsigned idx = bi_choose_index(st, clause, tuple, live_after_temp, fma); in bi_take_instr()
1304 bi_pop_instr(clause, tuple, instr, live_after_temp, fma); in bi_take_instr()
1470 /* Merges constants in a clause, satisfying the following rules, assuming no
1608 * swapping all references so the meaning of the clause is preserved */
1647 * (with clause format 12), with M1 values computed from the pair */ in bi_apply_constant_modifiers()
1696 /* Schedule a single clause. If no instructions remain, return NULL. */
1703 bi_clause *clause = rzalloc(ctx, bi_clause); in bi_schedule_clause() local
1706 const unsigned max_tuples = ARRAY_SIZE(clause->tuples); in bi_schedule_clause()
1709 clause->flow_control = BIFROST_FLOW_NBTB; in bi_schedule_clause()
1711 /* The last clause can only write one instruction, so initialize that */ in bi_schedule_clause()
1727 .last = (clause->tuple_count == 0), in bi_schedule_clause()
1737 unsigned idx = max_tuples - clause->tuple_count - 1; in bi_schedule_clause()
1739 tuple = &clause->tuples[idx]; in bi_schedule_clause()
1741 if (clause->message && bi_opcode_props[clause->message->op].sr_read && in bi_schedule_clause()
1742 !bi_is_null(clause->message->src[0])) { in bi_schedule_clause()
1743 unsigned nr = bi_count_read_registers(clause->message, 0); in bi_schedule_clause()
1745 (BITFIELD64_MASK(nr) << clause->message->src[0].value); in bi_schedule_clause()
1766 /* We may have a message, but only one per clause */ in bi_schedule_clause()
1771 clause->message_type = bi_message_type_for_instr(tuple->add); in bi_schedule_clause()
1772 clause->message = tuple->add; in bi_schedule_clause()
1780 clause->dependencies |= (1 << BIFROST_SLOT_ELDEST_DEPTH); in bi_schedule_clause()
1784 clause->dependencies |= (1 << BIFROST_SLOT_ELDEST_COLOUR); in bi_schedule_clause()
1787 clause->dependencies |= (1 << BIFROST_SLOT_ELDEST_DEPTH); in bi_schedule_clause()
1788 clause->dependencies |= (1 << BIFROST_SLOT_ELDEST_COLOUR); in bi_schedule_clause()
1833 clause->tuple_count++; in bi_schedule_clause()
1850 } while (clause->tuple_count < 8); in bi_schedule_clause()
1852 /* Don't schedule an empty clause */ in bi_schedule_clause()
1853 if (!clause->tuple_count) in bi_schedule_clause()
1857 for (unsigned i = max_tuples - clause->tuple_count; i < max_tuples; ++i) { in bi_schedule_clause()
1858 bi_tuple *tuple = &clause->tuples[i]; in bi_schedule_clause()
1881 clause_state.consts, constant_pairs, &pcrel_idx, clause->tuple_count, in bi_schedule_clause()
1884 clause->pcrel_idx = pcrel_idx; in bi_schedule_clause()
1886 for (unsigned i = max_tuples - clause->tuple_count; i < max_tuples; ++i) { in bi_schedule_clause()
1887 bi_tuple *tuple = &clause->tuples[i]; in bi_schedule_clause()
1908 clause->constant_count = constant_words; in bi_schedule_clause()
1909 memcpy(clause->constants, constant_pairs, sizeof(constant_pairs)); in bi_schedule_clause()
1912 bi_instr *last = clause->tuples[max_tuples - 1].add; in bi_schedule_clause()
1913 clause->next_clause_prefetch = !last || (last->op != BI_OPCODE_JUMP); in bi_schedule_clause()
1914 clause->block = block; in bi_schedule_clause()
1916 clause->ftz = (clause_state.ftz == BI_FTZ_STATE_ENABLE); in bi_schedule_clause()
1920 memmove(clause->tuples, clause->tuples + (max_tuples - clause->tuple_count), in bi_schedule_clause()
1921 clause->tuple_count * sizeof(clause->tuples[0])); in bi_schedule_clause()
1927 for (unsigned t = 1; t < clause->tuple_count; ++t) in bi_schedule_clause()
1928 bi_rewrite_passthrough(clause->tuples[t - 1], clause->tuples[t]); in bi_schedule_clause()
1930 return clause; in bi_schedule_clause()
1956 /* Back-to-back bit affects only the last clause of a block, in bi_schedule_block()
1972 bi_foreach_clause_in_block(block, clause) { in bi_schedule_block()
1973 for (unsigned i = 0; i < clause->tuple_count; ++i) { in bi_schedule_block()
1974 bi_foreach_instr_in_tuple(&clause->tuples[i], ins) { in bi_schedule_block()
2083 * clause of a shader. v6 requires adding a NOP clause with the depedency. */
2095 /* Fetch the first clause of the shader */ in bi_add_nop_for_atest()
2097 bi_clause *clause = bi_next_clause(ctx, block, NULL); in bi_add_nop_for_atest() local
2099 if (!clause || !(clause->dependencies & ((1 << BIFROST_SLOT_ELDEST_DEPTH) | in bi_add_nop_for_atest()
2104 * clause */ in bi_add_nop_for_atest()
2113 .block = clause->block, in bi_add_nop_for_atest()
2122 list_add(&new_clause->link, &clause->block->clauses); in bi_add_nop_for_atest()