diff options
| author | gingerBill <bill@gingerbill.org> | 2022-11-11 15:35:05 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2022-11-11 15:35:05 +0000 |
| commit | 22840ddf9769c47f8ac0f68b5b12f75200229bd9 (patch) | |
| tree | 4415fd82e4009df55a2b3c8fb6070fa2df773ce1 /src/llvm_backend.cpp | |
| parent | f9576c2f5bc6e1354a9e736b32bdfb193593173b (diff) | |
Add `noinline` LLVM attribute to static map procedures
Diffstat (limited to 'src/llvm_backend.cpp')
| -rw-r--r-- | src/llvm_backend.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/llvm_backend.cpp b/src/llvm_backend.cpp index 4d2f95bdf..5b9db7f2b 100644 --- a/src/llvm_backend.cpp +++ b/src/llvm_backend.cpp @@ -496,6 +496,9 @@ lbValue lb_map_get_proc_for_type(lbModule *m, Type *type) { LLVMSetLinkage(p->value, LLVMInternalLinkage); lb_add_attribute_to_proc(m, p->value, "readonly"); lb_add_attribute_to_proc(m, p->value, "nounwind"); + if (build_context.ODIN_DEBUG) { + lb_add_attribute_to_proc(m, p->value, "noinline"); + } LLVMValueRef x = LLVMGetParam(p->value, 0); LLVMValueRef y = LLVMGetParam(p->value, 1); @@ -645,6 +648,9 @@ lbValue lb_map_set_proc_for_type(lbModule *m, Type *type) { LLVMSetLinkage(p->value, LLVMInternalLinkage); lb_add_attribute_to_proc(m, p->value, "nounwind"); + if (build_context.ODIN_DEBUG) { + lb_add_attribute_to_proc(m, p->value, "noinline"); + } lbValue map_ptr = {LLVMGetParam(p->value, 0), t_rawptr}; lbValue hash = {LLVMGetParam(p->value, 1), t_uintptr}; |