Pass function pointer directly rather than load/store into alloca

This commit is contained in:
Ayaz Hafiz 2023-07-07 11:46:07 -05:00
parent a123820b2b
commit 6ba6b04a17
No known key found for this signature in database
GPG key ID: 0E2A37416A25EF58
2 changed files with 3 additions and 14 deletions

View file

@ -1143,9 +1143,7 @@ pub(crate) fn build_exp_expr<'a, 'ctx>(
}
FunctionPointer { lambda_name } => {
let function_ptr_type =
fn_ptr::pointer_type_expecting_layout(env, layout_interner, layout);
let alloca = fn_ptr::build(env, *lambda_name, function_ptr_type);
let alloca = fn_ptr::build(env, *lambda_name);
alloca.into()
}
ErasedMake { value, callee } => {