Lines Matching defs:state

55                  struct match_state *state);
259 struct match_state *state)
295 num_components, new_swizzle, state);
301 if (state->variables_seen & (1 << var->variable)) {
302 if (state->variables[var->variable].src.ssa != instr->src[src].src.ssa)
308 if (state->variables[var->variable].swizzle[i] != new_swizzle[i])
318 if (var->cond_index != -1 && !table->variable_cond[var->cond_index](state->range_ht, instr,
326 state->variables_seen |= (1 << var->variable);
327 state->variables[var->variable].src = instr->src[src].src;
328 state->variables[var->variable].abs = false;
329 state->variables[var->variable].negate = false;
333 state->variables[var->variable].swizzle[i] = new_swizzle[i];
335 state->variables[var->variable].swizzle[i] = 0;
396 struct match_state *state)
410 state->inexact_match = expr->inexact || state->inexact_match;
411 state->has_exact_alu = (instr->exact && !expr->ignore_exact) || state->has_exact_alu;
412 if (state->inexact_match && state->has_exact_alu)
438 ((state->comm_op_direction >> expr->comm_expr_idx) & 1) : 0;
445 if (!match_value(table, &state->table->values[expr->srcs[i]].value, instr,
447 num_components, swizzle, state)) {
458 struct match_state *state)
463 return nir_src_bit_size(state->variables[-value->bit_size - 1].src);
471 struct match_state *state,
477 unsigned dst_bit_size = replace_bitsize(value, search_bitsize, state);
494 alu->exact = state->has_exact_alu || expr->exact;
503 alu->src[i] = construct_value(build, &state->table->values[expr->srcs[i]].value,
505 state, instr);
511 util_dynarray_num_elements(state->states, uint16_t));
512 util_dynarray_append(state->states, uint16_t, 0);
513 nir_algebraic_automaton(&alu->instr, state->states, state->pass_op_table);
526 assert(state->variables_seen & (1 << var->variable));
529 nir_alu_src_copy(&val, &state->variables[var->variable]);
533 val.swizzle[i] = state->variables[var->variable].swizzle[var->swizzle[i]];
540 unsigned bit_size = replace_bitsize(value, search_bitsize, state);
562 util_dynarray_num_elements(state->states, uint16_t));
563 util_dynarray_append(state->states, uint16_t, 0);
564 nir_algebraic_automaton(cval->parent_instr, state->states,
565 state->pass_op_table);
675 * recursively updating the automaton state until it stabilizes.
704 struct match_state state;
705 state.inexact_match = false;
706 state.has_exact_alu = false;
707 state.range_ht = range_ht;
708 state.pass_op_table = table->pass_op_table;
709 state.table = table;
711 STATIC_ASSERT(sizeof(state.comm_op_direction) * 8 >= NIR_SEARCH_MAX_COMM_OPS);
721 state.comm_op_direction = comb;
722 state.variables_seen = 0;
726 swizzle, &state)) {
778 state.states = states;
783 &state, &instr->instr);
796 * through the uses updating the automaton's state.
837 uint16_t *state = util_dynarray_element(states, uint16_t,
839 if (*state != tbl->table[index]) {
840 *state = tbl->table[index];
848 uint16_t *state = util_dynarray_element(states, uint16_t,
850 if (*state != CONST_STATE) {
851 *state = CONST_STATE;
914 * state 0 is the default state, which means we don't have to visit
928 /* Walk top-to-bottom setting up the automaton state. */