Remove early DCE of builtins

Early DCE was sometimes cleaning up functions that we actaully still needed.
At some point we can come back to it and try to properly protect all special functions.
Until then, this still enables DCE, but it runs later with the full generated Roc module.
This commit is contained in:
Brendan Hansknecht 2023-12-11 08:23:56 -08:00
parent 3120dee509
commit fb049b661a
No known key found for this signature in database
GPG key ID: 0EA784685083E75B
2 changed files with 5 additions and 35 deletions

View file

@ -80,10 +80,6 @@ pub(crate) fn add_intrinsics<'ctx>(ctx: &'ctx Context, module: &Module<'ctx>) {
let i32_type = ctx.i32_type();
let void_type = ctx.void_type();
if let Some(func) = module.get_function("__muloti4") {
func.set_linkage(Linkage::WeakAny);
}
add_intrinsic(
ctx,
module,