Skip to content

Commit fdf30b6

Browse files
committed
Relax inline heuristics hints
This relaxation allows compiler optimization to perform certain kinds of code rearrangement that preserve the semantics of properly.
1 parent 925b587 commit fdf30b6

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

src/emulate.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -713,19 +713,18 @@ static bool detect_memcpy(riscv_t *rv, size_t type)
713713
return true;
714714
}
715715

716-
FORCE_INLINE void remove_next_nth_ir(riscv_t *rv,
717-
rv_insn_t *ir,
718-
block_t *block,
719-
uint8_t n)
716+
static inline void remove_next_nth_ir(const riscv_t *rv,
717+
rv_insn_t *ir,
718+
block_t *block,
719+
uint8_t n)
720720
{
721721
for (uint8_t i = 0; i < n; i++) {
722722
rv_insn_t *next = ir->next;
723723
ir->next = ir->next->next;
724724
mpool_free(rv->block_ir_mp, next);
725725
}
726-
if (!ir->next) {
726+
if (!ir->next)
727727
block->ir_tail = ir;
728-
}
729728
block->n_insn -= n;
730729
}
731730

0 commit comments

Comments
 (0)