From 3edb3d8d8c16a24371bb401fe0d69ec93e667b27 Mon Sep 17 00:00:00 2001 From: gingerBill Date: Sun, 13 Nov 2022 23:24:08 +0000 Subject: Simplify the handling of the hashing calls for `map`s --- src/llvm_backend.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src/llvm_backend.cpp') diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 5b9db7f2b..2ee292880 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -282,23 +282,11 @@ lbValue lb_equal_proc_for_type(lbModule *m, Type *type) { lbValue lb_simple_compare_hash(lbProcedure *p, Type *type, lbValue data, lbValue seed) { GB_ASSERT_MSG(is_type_simple_compare(type), "%s", type_to_string(type)); - i64 sz = type_size_of(type); - - if (1 <= sz && sz <= 16) { - char name[32] = {}; - gb_snprintf(name, 32, "default_hasher%d", cast(i32)sz); - - auto args = array_make(permanent_allocator(), 2); - args[0] = data; - args[1] = seed; - return lb_emit_runtime_call(p, name, args); - } - auto args = array_make(permanent_allocator(), 3); args[0] = data; args[1] = seed; args[2] = lb_const_int(p->module, t_int, type_size_of(type)); - return lb_emit_runtime_call(p, "default_hasher_n", args); + return lb_emit_runtime_call(p, "default_hasher", args); } void lb_add_callsite_force_inline(lbProcedure *p, lbValue ret_value) { -- cgit v1.2.3