Skip to content

Commit

Permalink
Do not force inling functions that have pointer args.
Browse files Browse the repository at this point in the history
The new encoding can handle functions with pointer arguments.

So this change reverts #4899.

Also see #2819, which first introduced this hack.
  • Loading branch information
vaivaswatha committed Mar 23, 2024
1 parent 0bf4db6 commit af58459
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions sway-ir/src/optimize/inline.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
};

Expand Down

0 comments on commit af58459

Please sign in to comment.