From 38586e626666eba2c6fb4f2ec553939af4ef8f65 Mon Sep 17 00:00:00 2001 From: DaniPopes <57450786+DaniPopes@users.noreply.github.com> Date: Tue, 16 Jul 2024 19:19:10 +0200 Subject: [PATCH] no inline --- crates/revmc/src/compiler/translate.rs | 30 +++++++++++++------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/crates/revmc/src/compiler/translate.rs b/crates/revmc/src/compiler/translate.rs index 7a53322..f7c011c 100644 --- a/crates/revmc/src/compiler/translate.rs +++ b/crates/revmc/src/compiler/translate.rs @@ -1543,11 +1543,11 @@ impl<'a, B: Backend> FunctionCx<'a, B> { /// Builds: `fn calldataload(index: u256, contract: ptr) -> u256` fn build_calldataload(&mut self) { - // self.bcx.add_function_attribute( - // None, - // Attribute::AlwaysInline, - // FunctionAttributeLocation::Function, - // ); + self.bcx.add_function_attribute( + None, + Attribute::NoInline, + FunctionAttributeLocation::Function, + ); let index = self.bcx.fn_param(0); let contract = self.bcx.fn_param(1); @@ -1646,11 +1646,11 @@ impl<'a, B: Backend> FunctionCx<'a, B> { fn build_mem_op(&mut self, kind: MemOpKind) { let is_load = matches!(kind, MemOpKind::Load); // if is_load { - // self.bcx.add_function_attribute( - // None, - // Attribute::AlwaysInline, - // FunctionAttributeLocation::Function, - // ); + self.bcx.add_function_attribute( + None, + Attribute::NoInline, + FunctionAttributeLocation::Function, + ); // } let ptr_args = if is_load { &[1, 2][..] } else { &[2][..] }; for &ptr_arg in ptr_args { @@ -1774,11 +1774,11 @@ impl<'a, B: Backend> FunctionCx<'a, B> { let word = self.word_type; self.call_ir_builtin(name, &[x1, x2], &[word, word], Some(word), |this| { build(this); - // this.bcx.add_function_attribute( - // None, - // Attribute::AlwaysInline, - // FunctionAttributeLocation::Function, - // ); + this.bcx.add_function_attribute( + None, + Attribute::NoInline, + FunctionAttributeLocation::Function, + ); }) .unwrap() }