[llvm] [utils][MCA] Add a helper script to create input-file-based tests (PR #190074)
Pengcheng Wang via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 2 20:02:42 PDT 2026
================
@@ -0,0 +1,85 @@
+#!/usr/bin/env python3
+
+from pathlib import Path
+from os import path
+from argparse import ArgumentParser
+
+desc = """
+A simple script to create new llvm-mca tests from a set of input files. For each .s files under <input files folder>,
+it creates a corresponding .test file containing the RUN line, in which the llvm-mca command reads the input from the
+said .s file.
+
+Example Usage:
+```
+create_mca_tests.py --triple riscv64 --cpu generic-rv64 test/tools/llvm-mca/RISCV/Inputs test/tools/llvm-mca/RISCV/Generic
----------------
wangpc-pp wrote:
`create_mca_tests.py` ->`create_template_mca_tests.py`. BTW, you should use underline `_` instead of `-` in the file name? :-)
https://github.com/llvm/llvm-project/pull/190074
More information about the llvm-commits
mailing list