switch over to alloca expr

This commit is contained in:
Folkert 2023-07-29 20:20:40 +02:00
parent cdd2aab217
commit 44d03eebfa
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
8 changed files with 9 additions and 67 deletions

View file

@ -30,8 +30,8 @@ use crate::llvm::{
},
build::{
cast_basic_basic, complex_bitcast_check_size, create_entry_block_alloca,
entry_block_alloca_zerofill, function_value_by_func_spec, load_roc_value,
roc_function_call, tag_pointer_clear_tag_id, BuilderExt, FuncBorrowSpec, RocReturn,
function_value_by_func_spec, load_roc_value, roc_function_call, tag_pointer_clear_tag_id,
BuilderExt, FuncBorrowSpec, RocReturn,
},
build_list::{
list_append_unsafe, list_concat, list_drop_at, list_get_unsafe, list_len, list_map,
@ -1331,16 +1331,6 @@ pub(crate) fn run_low_level<'a, 'ctx>(
tag_pointer_clear_tag_id(env, ptr.into_pointer_value()).into()
}
Alloca => {
arguments!(initial_value);
let ptr = entry_block_alloca_zerofill(env, initial_value.get_type(), "stack_value");
env.builder.build_store(ptr, initial_value);
ptr.into()
}
RefCountIncRcPtr | RefCountDecRcPtr | RefCountIncDataPtr | RefCountDecDataPtr => {
unreachable!("Not used in LLVM backend: {:?}", op);
}