[llvm] update_llc_test_checks: better support for non-llc tools (PR #93135)
via llvm-commits
llvm-commits at lists.llvm.org
Wed May 22 21:44:39 PDT 2024
github-actions[bot] wrote:
<!--LLVM CODE FORMAT COMMENT: {darker}-->
:warning: Python code formatter, darker found issues in your code. :warning:
<details>
<summary>
You can test this locally with the following command:
</summary>
``````````bash
darker --check --diff -r ba8a2ade84f4c1bfc531fe3673470377c038f31d...1ff8c8cfc2bbf6b5689db52bca6ce07137544d46 llvm/utils/UpdateTestChecks/asm.py llvm/utils/update_llc_test_checks.py
``````````
</details>
<details>
<summary>
View the diff from darker here.
</summary>
``````````diff
--- UpdateTestChecks/asm.py 2024-05-23 04:39:26.000000 +0000
+++ UpdateTestChecks/asm.py 2024-05-23 04:44:18.511116 +0000
@@ -49,11 +49,11 @@
r"^\s*(\.Lfunc_end[0-9]+|// -- End function)",
flags=(re.M | re.S),
)
ASM_FUNCTION_AMDGPU_RE = re.compile(
- r'\.type\s+_?(?P<func>[^,\n]+), at function\n'
+ r"\.type\s+_?(?P<func>[^,\n]+), at function\n"
r'^_?(?P=func):(?:[ \t]*;+[ \t]*@"?(?P=func)"?)?\n'
r"(?P<body>.*?)\n" # (body of the function)
# This list is incomplete
r"^\s*(\.Lfunc_end[0-9]+:\n|\.section)",
flags=(re.M | re.S),
--- update_llc_test_checks.py 2024-05-23 04:39:26.000000 +0000
+++ update_llc_test_checks.py 2024-05-23 04:44:18.604902 +0000
@@ -109,12 +109,13 @@
from UpdateTestChecks import isel as output_type
else:
from UpdateTestChecks import asm as output_type
common.verify_filecheck_prefixes(filecheck_cmd)
- if llc_tool not in LLC_LIKE_TOOLS and \
- (not ti.args.tool or llc_tool != ti.args.tool):
+ if llc_tool not in LLC_LIKE_TOOLS and (
+ not ti.args.tool or llc_tool != ti.args.tool
+ ):
common.warn("Skipping non-llc RUN line: " + l)
continue
if not filecheck_cmd.startswith("FileCheck "):
common.warn("Skipping non-FileChecked RUN line: " + l)
``````````
</details>
https://github.com/llvm/llvm-project/pull/93135
More information about the llvm-commits
mailing list