[clang] [perf-training][merge-fdata] Clean up input fdata files (PR #139650)

Amir Ayupov via cfe-commits cfe-commits at lists.llvm.org
Fri Nov 6 18:22:42 PST 2026


https://github.com/aaupov updated https://github.com/llvm/llvm-project/pull/139650

>From c3f8513294f072118de7f877099ad08cbe0059dc Mon Sep 17 00:00:00 2001
From: Amir Ayupov <aaupov at fb.com>
Date: Mon, 12 May 2025 17:57:04 -0700
Subject: [PATCH] =?UTF-8?q?[=F0=9D=98=80=F0=9D=97=BD=F0=9D=97=BF]=20initia?=
 =?UTF-8?q?l=20version?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Created using spr 1.3.5
---
 clang/utils/perf-training/perf-helper.py | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/clang/utils/perf-training/perf-helper.py b/clang/utils/perf-training/perf-helper.py
index e28920f3e0c43c..8b8e9124ccc993 100644
--- a/clang/utils/perf-training/perf-helper.py
+++ b/clang/utils/perf-training/perf-helper.py
@@ -73,9 +73,11 @@ def merge_fdata(args):
             + "\tMerges all fdata files from path into output."
         )
         return 1
-    cmd = [args[0], "-o", args[1]]
-    cmd.extend(findFilesWithExtension(args[2], "fdata"))
-    subprocess.check_call(cmd)
+    inputs = findFilesWithExtension(args[2], "fdata")
+    subprocess.check_call([args[0], inputs, "-o", args[1]])
+    # Remove input fdata files to save space.
+    for filename in inputs:
+        os.remove(filename)
     return 0
 
 



More information about the cfe-commits mailing list