aboutsummaryrefslogtreecommitdiff
path: root/src/llvm_backend.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2022-09-21 13:06:02 +0100
committergingerBill <bill@gingerbill.org>2022-09-21 13:06:02 +0100
commit831620bfc4f1210900669ce501723a64f04c1807 (patch)
tree2e864bce9bc9008651278427e7b10c74730a7b67 /src/llvm_backend.cpp
parent4f50988799d48aaf78c75130daca59a295efab19 (diff)
Remove header cache code
Diffstat (limited to 'src/llvm_backend.cpp')
-rw-r--r--src/llvm_backend.cpp25
1 files changed, 0 insertions, 25 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp
index b340b9b7a..adccb2869 100644
--- a/src/llvm_backend.cpp
+++ b/src/llvm_backend.cpp
@@ -578,31 +578,6 @@ lbAddr lb_gen_map_header_internal(lbProcedure *p, lbValue map_val_ptr, Type *map
return h;
}
-
-lbValue lb_gen_map_header(lbProcedure *p, lbValue map_val_ptr, Type *map_type) {
- GB_ASSERT_MSG(is_type_pointer(map_val_ptr.type), "%s", type_to_string(map_val_ptr.type));
- GB_ASSERT(is_type_map(map_type));
-
-
- // TODO(bill): this is a temporary fix since this caching is not working other platforms
- bool allow_caching = build_context.metrics.os == TargetOs_windows || is_arch_wasm();
-
- lbAddr h = {};
- if (!allow_caching) {
- h = lb_gen_map_header_internal(p, map_val_ptr, map_type);
- } else {
- lbAddr *found = map_get(&p->map_header_cache, map_val_ptr.value);
- if (found != nullptr) {
- h = *found;
- } else {
- h = lb_gen_map_header_internal(p, map_val_ptr, map_type);
- map_set(&p->map_header_cache, map_val_ptr.value, h);
- }
- }
-
- return lb_addr_load(p, h);
-}
-
lbValue lb_const_hash(lbModule *m, lbValue key, Type *key_type) {
if (true) {
return {};