Skip to content

Commit 0c3211a

Browse files
committed
opt(compile): allow aggressive inline
this allows get_effective_address() and isa_mmu_check() to be inlined. this improves about 10% of speed on zen4
1 parent c627904 commit 0c3211a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

Makefile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,12 @@ CFLAGS_BUILD += $(call remove_quote,$(CONFIG_CC_OPT))
8585
CFLAGS_BUILD += $(if $(CONFIG_CC_LTO),-flto=auto,)
8686
CFLAGS_BUILD += $(if $(CONFIG_CC_DEBUG),-ggdb3,)
8787
CFLAGS_BUILD += $(if $(CONFIG_CC_ASAN),-fsanitize=address,)
88+
89+
# Fine-tuned compiler options
90+
ifeq ($(CC), gcc)
91+
CFLAGS_BUILD += --param max-inline-insns-single=256 -falign-labels=32:9:64:15
92+
endif
93+
8894
CFLAGS += $(CFLAGS_BUILD)
8995
LDFLAGS += $(CFLAGS_BUILD)
9096

0 commit comments

Comments
 (0)