Skip to content

Commit

Permalink
no inline
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes committed Jul 16, 2024
1 parent b09ca37 commit 38586e6
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions crates/revmc/src/compiler/translate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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()
}
Expand Down

0 comments on commit 38586e6

Please sign in to comment.