28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
From dccbc0ca6c05ae315967a603870d553c231a68a1 Mon Sep 17 00:00:00 2001
|
|
From: Alexandre Frade <kernel@xanmod.org>
|
|
Date: Mon, 16 Sep 2024 00:55:35 +0000
|
|
Subject: [PATCH 02/18] XANMOD: kbuild: Add GCC SMS-based modulo scheduling
|
|
flags
|
|
|
|
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
|
|
---
|
|
Makefile | 7 ++++
|
|
1 file changed, 7 insertions(+)
|
|
|
|
--- a/Makefile
|
|
+++ b/Makefile
|
|
@@ -824,6 +824,13 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
|
KBUILD_CFLAGS += $(call cc-option,-fivopts)
|
|
endif
|
|
|
|
+ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
|
+# Perform swing modulo scheduling immediately before the first scheduling pass.
|
|
+# This pass looks at innermost loops and reorders their instructions by
|
|
+# overlapping different iterations.
|
|
+KBUILD_CFLAGS += $(call cc-option,-fmodulo-sched -fmodulo-sched-allow-regmoves)
|
|
+endif
|
|
+
|
|
# Always set `debug-assertions` and `overflow-checks` because their default
|
|
# depends on `opt-level` and `debug-assertions`, respectively.
|
|
KBUILD_RUSTFLAGS += -Cdebug-assertions=$(if $(CONFIG_RUST_DEBUG_ASSERTIONS),y,n)
|