[PATCH] D122824: [UpdateLLCTestChecks] Add function prefix to make generated isel debug output checks runnable in update_llc_test_checks.py

Sebastian Neubauer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 1 01:17:49 PDT 2022


Flakebi added a comment.

Just to check that I understand this correctly.
Is the intention behind the function prefix to make it configurable in the end, so that one can also check for `Legalized selection DAG` and others?

Or is it only to pick the right block, without making it configurable?
Then I think it would be easier to use `check_label_format = '{} %s-LABEL: Selected selection DAG:{{.*}}%s%s:'`, which does not need any changes in common.py



================
Comment at: llvm/utils/UpdateTestChecks/common.py:844-846
+        func_prefix = func_dict[checkprefix][func_name].func_prefix + '{{.*}}' if func_dict[checkprefix][func_name].func_prefix else ''
+        if func_prefix:
+          output_lines.append(check_label_format % (checkprefix, func_prefix, func_name, args_and_sig))
----------------
This might be easier to read?
```
func_prefix = func_dict[checkprefix][func_name].func_prefix
if func_prefix:
  output_lines.append(check_label_format % (checkprefix, func_prefix + '{{.*}}', func_name, args_and_sig))
```


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D122824/new/

https://reviews.llvm.org/D122824



More information about the llvm-commits mailing list