X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=src%2Fcompiler%2Fglsl%2Flower_int64.cpp;h=43774d6ab334d9ba8d8f0546ea3852402c5402fd;hb=4cca5137aed20c93bfcb57324d094f585984c0c9;hp=4e2e311e02de8f6391efe3984b8752af7d7ef71a;hpb=100721959bb400f16e42aada6ee8215458b9fcdd;p=mesa.git diff --git a/src/compiler/glsl/lower_int64.cpp b/src/compiler/glsl/lower_int64.cpp index 4e2e311e02d..43774d6ab33 100644 --- a/src/compiler/glsl/lower_int64.cpp +++ b/src/compiler/glsl/lower_int64.cpp @@ -69,11 +69,11 @@ namespace { class lower_64bit_visitor : public ir_rvalue_visitor { public: lower_64bit_visitor(void *mem_ctx, exec_list *instructions, unsigned lower) - : progress(false), lower(lower), instructions(instructions), + : progress(false), lower(lower), function_list(), added_functions(&function_list, mem_ctx) { functions = _mesa_hash_table_create(mem_ctx, - _mesa_key_hash_string, + _mesa_hash_string, _mesa_key_string_equal); foreach_in_list(ir_instruction, node, instructions) { @@ -111,8 +111,6 @@ public: private: unsigned lower; /** Bitfield of which operations to lower */ - exec_list *instructions; - /** Hashtable containing all of the known functions in the IR */ struct hash_table *functions; @@ -258,7 +256,7 @@ lower_64bit::lower_op_to_function_call(ir_instruction *base_ir, ir_expression *ir, ir_function_signature *callee) { - const unsigned num_operands = ir->get_num_operands(); + const unsigned num_operands = ir->num_operands; ir_variable *src[4][4]; ir_variable *dst[4]; void *const mem_ctx = ralloc_parent(ir); @@ -319,7 +317,7 @@ lower_64bit_visitor::handle_op(ir_expression *ir, const char *function_name, function_generator generator) { - for (unsigned i = 0; i < ir->get_num_operands(); i++) + for (unsigned i = 0; i < ir->num_operands; i++) if (!ir->operands[i]->type->is_integer_64()) return ir; @@ -341,6 +339,7 @@ lower_64bit_visitor::handle_op(ir_expression *ir, add_function(f); } + this->progress = true; return lower_op_to_function_call(this->base_ir, ir, callee); } @@ -357,7 +356,6 @@ lower_64bit_visitor::handle_rvalue(ir_rvalue **rvalue) case ir_unop_sign: if (lowering(SIGN64)) { *rvalue = handle_op(ir, "__builtin_sign64", generate_ir::sign64); - this->progress = true; } break; @@ -368,7 +366,6 @@ lower_64bit_visitor::handle_rvalue(ir_rvalue **rvalue) } else { *rvalue = handle_op(ir, "__builtin_idiv64", generate_ir::idiv64); } - this->progress = true; } break; @@ -379,14 +376,12 @@ lower_64bit_visitor::handle_rvalue(ir_rvalue **rvalue) } else { *rvalue = handle_op(ir, "__builtin_imod64", generate_ir::imod64); } - this->progress = true; } break; case ir_binop_mul: if (lowering(MUL64)) { *rvalue = handle_op(ir, "__builtin_umul64", generate_ir::umul64); - this->progress = true; } break;