From af584592a4e95fb46129c21093ae3f51642b9608 Mon Sep 17 00:00:00 2001 From: Vaivaswatha Nagaraj Date: Sat, 23 Mar 2024 13:54:53 +0530 Subject: [PATCH] Do not force inling functions that have pointer args. The new encoding can handle functions with pointer arguments. So this change reverts #4899. Also see #2819, which first introduced this hack. --- sway-ir/src/optimize/inline.rs | 9 --------- 1 file changed, 9 deletions(-) diff --git a/sway-ir/src/optimize/inline.rs b/sway-ir/src/optimize/inline.rs index a98893aa1bd..8c209ea162c 100644 --- a/sway-ir/src/optimize/inline.rs +++ b/sway-ir/src/optimize/inline.rs @@ -132,15 +132,6 @@ pub fn inline_in_module( return true; } - // See https://github.com/FuelLabs/sway/pull/4899 - if func.args_iter(ctx).any(|(_name, arg_val)| { - arg_val.get_type(ctx).map_or(false, |ty| { - ty.is_ptr(ctx) || !(ty.is_unit(ctx) | ty.is_bool(ctx) | ty.is_uint(ctx)) - }) - }) { - return true; - } - false };