mirror of
https://github.com/Ed94/Odin.git
synced 2026-08-06 15:48:51 +00:00
Add noinline LLVM attribute to static map procedures
This commit is contained in:
@@ -496,6 +496,9 @@ lbValue lb_map_get_proc_for_type(lbModule *m, Type *type) {
|
|||||||
LLVMSetLinkage(p->value, LLVMInternalLinkage);
|
LLVMSetLinkage(p->value, LLVMInternalLinkage);
|
||||||
lb_add_attribute_to_proc(m, p->value, "readonly");
|
lb_add_attribute_to_proc(m, p->value, "readonly");
|
||||||
lb_add_attribute_to_proc(m, p->value, "nounwind");
|
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 x = LLVMGetParam(p->value, 0);
|
||||||
LLVMValueRef y = LLVMGetParam(p->value, 1);
|
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);
|
LLVMSetLinkage(p->value, LLVMInternalLinkage);
|
||||||
lb_add_attribute_to_proc(m, p->value, "nounwind");
|
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 map_ptr = {LLVMGetParam(p->value, 0), t_rawptr};
|
||||||
lbValue hash = {LLVMGetParam(p->value, 1), t_uintptr};
|
lbValue hash = {LLVMGetParam(p->value, 1), t_uintptr};
|
||||||
|
|||||||
Reference in New Issue
Block a user