[flang-commits] [flang] [flang][cmake][bolt] Do not train on non-strictly-fortran test cases (PR #206130)
Paul Osmialowski via flang-commits
flang-commits at lists.llvm.org
Fri Jun 26 09:59:50 PDT 2026
https://github.com/pawosm-arm created https://github.com/llvm/llvm-project/pull/206130
During my experiments with those new CMake caches I've noticed that using the check-flang test suite for the performance training has a lot of the overhead. Namely, not only flang is being executed, but also bbc and tco and other things that do not participate in further flang optimization effort. This patch eliminates this overhead by limiting the number of processed suffixes.
>From 272a368c871c6b9638c9303441103ab584d7b566 Mon Sep 17 00:00:00 2001
From: Paul Osmialowski <pawel.osmialowski at arm.com>
Date: Fri, 26 Jun 2026 14:14:48 +0000
Subject: [PATCH] [flang][cmake][bolt] Do not train on non-strictly-fortran
test cases
During my experiments with those new CMake caches I've noticed
that using the check-flang test suite for the performance training has
a lot of the overhead. Namely, not only flang is being executed, but
also bbc and tco and other things that do not participate in further
flang optimization effort. This patch eliminates this overhead by
limiting the number of processed suffixes.
---
flang/test/bolt.lit.cfg | 24 ++++++++++++++++++++++++
flang/test/lit.cfg.py | 32 --------------------------------
flang/test/pgo.lit.cfg | 24 ++++++++++++++++++++++++
flang/test/test.lit.cfg | 32 ++++++++++++++++++++++++++++++++
4 files changed, 80 insertions(+), 32 deletions(-)
diff --git a/flang/test/bolt.lit.cfg b/flang/test/bolt.lit.cfg
index d245d8c616881..da132ea53fd08 100644
--- a/flang/test/bolt.lit.cfg
+++ b/flang/test/bolt.lit.cfg
@@ -29,3 +29,27 @@ config.name = "Flang BOLT Training"
config.flang_exe = perf_wrapper + flang_nowrapper
config.llvm_profile_file = ''
+
+# suffixes: A list of file extensions to treat as test files.
+config.suffixes = [
+ ".f",
+ ".F",
+ ".ff",
+ ".FOR",
+ ".for",
+ ".f77",
+ ".f90",
+ ".F90",
+ ".ff90",
+ ".f95",
+ ".F95",
+ ".ff95",
+ ".fpp",
+ ".FPP",
+ ".f18",
+ ".F18",
+ ".f03",
+ ".F03",
+ ".f08",
+ ".F08",
+]
diff --git a/flang/test/lit.cfg.py b/flang/test/lit.cfg.py
index b1abadb32fedb..5e1c1ab4c9ea7 100644
--- a/flang/test/lit.cfg.py
+++ b/flang/test/lit.cfg.py
@@ -32,38 +32,6 @@
# the test runner updated.
config.test_format = lit.formats.ShTest(execute_external=not use_lit_shell)
-# suffixes: A list of file extensions to treat as test files.
-config.suffixes = [
- ".c",
- ".cpp",
- ".f",
- ".F",
- ".ff",
- ".FOR",
- ".for",
- ".f77",
- ".f90",
- ".F90",
- ".ff90",
- ".f95",
- ".F95",
- ".ff95",
- ".fpp",
- ".FPP",
- ".cuf",
- ".CUF",
- ".f18",
- ".F18",
- ".f03",
- ".F03",
- ".f08",
- ".F08",
- ".ll",
- ".fir",
- ".mlir",
- ".s",
-]
-
config.substitutions.append(("%PATH%", config.environment["PATH"]))
config.substitutions.append(("%llvmshlibdir", config.llvm_shlib_dir))
config.substitutions.append(("%pluginext", config.llvm_plugin_ext))
diff --git a/flang/test/pgo.lit.cfg b/flang/test/pgo.lit.cfg
index 2c08f0f2a914c..5147b88bdf64e 100644
--- a/flang/test/pgo.lit.cfg
+++ b/flang/test/pgo.lit.cfg
@@ -9,3 +9,27 @@ config.name = 'Flang PGO Training'
config.flang_exe = lit.util.which('flang', config.flang_opt_tools_dir).replace('\\', '/')
config.llvm_profile_file = '../perf-training-%4m.profraw'
+
+# suffixes: A list of file extensions to treat as test files.
+config.suffixes = [
+ ".f",
+ ".F",
+ ".ff",
+ ".FOR",
+ ".for",
+ ".f77",
+ ".f90",
+ ".F90",
+ ".ff90",
+ ".f95",
+ ".F95",
+ ".ff95",
+ ".fpp",
+ ".FPP",
+ ".f18",
+ ".F18",
+ ".f03",
+ ".F03",
+ ".f08",
+ ".F08",
+]
diff --git a/flang/test/test.lit.cfg b/flang/test/test.lit.cfg
index 69ee4ac0e0cb4..2085e908a8963 100644
--- a/flang/test/test.lit.cfg
+++ b/flang/test/test.lit.cfg
@@ -10,3 +10,35 @@ config.name = "Flang"
config.flang_exe = lit.util.which("flang", config.flang_llvm_tools_dir)
config.llvm_profile_file = ''
+
+# suffixes: A list of file extensions to treat as test files.
+config.suffixes = [
+ ".c",
+ ".cpp",
+ ".f",
+ ".F",
+ ".ff",
+ ".FOR",
+ ".for",
+ ".f77",
+ ".f90",
+ ".F90",
+ ".ff90",
+ ".f95",
+ ".F95",
+ ".ff95",
+ ".fpp",
+ ".FPP",
+ ".cuf",
+ ".CUF",
+ ".f18",
+ ".F18",
+ ".f03",
+ ".F03",
+ ".f08",
+ ".F08",
+ ".ll",
+ ".fir",
+ ".mlir",
+ ".s",
+]
More information about the flang-commits
mailing list