1
0
linux/debian/patches/patchset-xanmod/xanmod/0001-XANMOD-kbuild-Add-GCC-SMS-based-modulo-scheduling-fl.patch

26 lines
956 B
Diff
Raw Normal View History

From 2a949c896ea66e647d94254c28b1d4d6194ee14b Mon Sep 17 00:00:00 2001
From: Alexandre Frade <kernel@xanmod.org>
Date: Mon, 16 Sep 2024 00:55:35 +0000
Subject: [PATCH 03/19] XANMOD: kbuild: Add GCC SMS-based modulo scheduling
flags
Signed-off-by: Alexandre Frade <kernel@xanmod.org>
---
Makefile | 5 +++++
1 file changed, 5 insertions(+)
--- a/Makefile
+++ b/Makefile
@@ -822,6 +822,11 @@ KBUILD_CFLAGS += -Os
KBUILD_RUSTFLAGS += -Copt-level=s
endif
+# 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)
+
# 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)