Lines Matching defs:value

69  * Check if a source produces a value of the given type.
257 const nir_search_value *value, nir_alu_instr *instr, unsigned src,
264 * know if the value changed between one instance of that value in the
266 * that value right before the last instruction in the expression we're
283 /* If the value has a specific bit size and it doesn't match, bail */
284 if (value->bit_size > 0 &&
285 nir_src_bit_size(instr->src[src].src) != value->bit_size)
288 switch (value->type) {
293 return match_expression(table, nir_search_value_as_expression(value),
298 nir_search_variable *var = nir_search_value_as_variable(value);
343 nir_search_constant *const_val = nir_search_value_as_constant(value);
389 unreachable("Invalid search value type");
406 if (expr->value.bit_size > 0 &&
407 instr->dest.dest.ssa.bit_size != expr->value.bit_size)
432 * up its direction for the current search operation. We'll use that value
445 if (!match_value(table, &state->table->values[expr->srcs[i]].value, instr,
457 replace_bitsize(const nir_search_value *value, unsigned search_bitsize,
460 if (value->bit_size > 0)
461 return value->bit_size;
462 if (value->bit_size < 0)
463 return nir_src_bit_size(state->variables[-value->bit_size - 1].src);
469 const nir_search_value *value,
474 switch (value->type) {
476 const nir_search_expression *expr = nir_search_value_as_expression(value);
477 unsigned dst_bit_size = replace_bitsize(value, search_bitsize, state);
490 * map to a particular replacement value. Therefore, if the
503 alu->src[i] = construct_value(build, &state->table->values[expr->srcs[i]].value,
525 const nir_search_variable *var = nir_search_value_as_variable(value);
539 const nir_search_constant *c = nir_search_value_as_constant(value);
540 unsigned bit_size = replace_bitsize(value, search_bitsize, state);
577 unreachable("Invalid search value type");
639 dump_value(table, &table->values[expr->srcs[i]].value);
674 /* Walk through the tree of uses of our new instruction's SSA value,
736 dump_value(&search->value);
795 /* Rewrite the uses of the old SSA value to the new one, and recurse
894 &table->values[xform->replace].value, worklist)) {