2024-12-10 06:44:25 +03:00
|
|
|
From dccbc0ca6c05ae315967a603870d553c231a68a1 Mon Sep 17 00:00:00 2001
|
2024-10-29 05:12:06 +03:00
|
|
|
From: Alexandre Frade <kernel@xanmod.org>
|
|
|
|
Date: Mon, 16 Sep 2024 00:55:35 +0000
|
2024-12-10 06:44:25 +03:00
|
|
|
Subject: [PATCH 02/18] XANMOD: kbuild: Add GCC SMS-based modulo scheduling
|
2024-10-29 05:12:06 +03:00
|
|
|
flags
|
|
|
|
|
|
|
|
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
|
|
|
|
---
|
2024-12-10 06:44:25 +03:00
|
|
|
Makefile | 7 ++++
|
|
|
|
1 file changed, 7 insertions(+)
|
2024-10-29 05:12:06 +03:00
|
|
|
|
|
|
|
--- a/Makefile
|
|
|
|
+++ b/Makefile
|
2024-12-16 07:12:49 +03:00
|
|
|
@@ -825,6 +825,13 @@ ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE
|
2024-12-10 06:44:25 +03:00
|
|
|
KBUILD_CFLAGS += $(call cc-option,-fivopts)
|
2024-10-29 05:12:06 +03:00
|
|
|
endif
|
|
|
|
|
2024-12-10 06:44:25 +03:00
|
|
|
+ifdef CONFIG_CC_OPTIMIZE_FOR_PERFORMANCE_O3
|
2024-10-29 05:12:06 +03:00
|
|
|
+# 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)
|
2024-12-10 06:44:25 +03:00
|
|
|
+endif
|
2024-10-29 05:12:06 +03:00
|
|
|
+
|
|
|
|
# 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)
|