aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-11-13 23:24:08 +0000
committergingerBill <bill@gingerbill.org>2022-11-13 23:24:08 +0000
commit3edb3d8d8c16a24371bb401fe0d69ec93e667b27 (patch)
tree86ff2bafa1ac5a726f5f455730462b407b9659df /src/llvm_backend.cpp
parenta705a2e38bee035d6800999ba6eddd82792594f7 (diff)
Simplify the handling of the hashing calls for `map`s
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp14
1 files changed, 1 insertions, 13 deletions
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<lbValue>(permanent_allocator(), 2);
- args[0] = data;
- args[1] = seed;
- return lb_emit_runtime_call(p, name, args);
- }
-
auto args = array_make<lbValue>(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) {