mirror of
https://github.com/odin-lang/Odin.git
synced 2026-03-02 14:48:20 +00:00
Use direct parameter value in lb_find_ident when possible
This commit is contained in:
@@ -486,6 +486,8 @@ void lb_begin_procedure_body(lbProcedure *p) {
|
||||
p->entry_block = lb_create_block(p, "entry", true);
|
||||
lb_start_block(p, p->entry_block);
|
||||
|
||||
map_init(&p->direct_parameters, heap_allocator());
|
||||
|
||||
GB_ASSERT(p->type != nullptr);
|
||||
|
||||
lb_ensure_abi_function_type(p->module, p);
|
||||
@@ -539,6 +541,8 @@ void lb_begin_procedure_body(lbProcedure *p) {
|
||||
param.value = value;
|
||||
param.type = e->type;
|
||||
|
||||
map_set(&p->direct_parameters, e, param);
|
||||
|
||||
lbValue ptr = lb_address_from_load_or_generate_local(p, param);
|
||||
GB_ASSERT(LLVMIsAAllocaInst(ptr.value));
|
||||
lb_add_entity(p->module, e, ptr);
|
||||
|
||||
Reference in New Issue
Block a user