1
0
linux/debian/patches/mixed-arch/0006-XANMOD-kbuild-Add-GCC-SMS-based-modulo-scheduling-fl.patch

28 lines
1.0 KiB
Diff
Raw Permalink Normal View History

2024-12-10 06:44:25 +03:00
From dccbc0ca6c05ae315967a603870d553c231a68a1 Mon Sep 17 00:00:00 2001
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
flags
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
2024-12-10 06:44:25 +03:00
Makefile | 7 ++++
1 file changed, 7 insertions(+)
--- 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)
endif
2024-12-10 06:44:25 +03:00
+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)
2024-12-10 06:44:25 +03:00
+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)