[PATCH] D152333: update_mir_test_checks.py doesn't separate different prefix checks #63112
Eddie Phillips via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 6 19:42:26 PDT 2023
eddiep24 created this revision.
eddiep24 added a reviewer: 0-wiz-0.
Herald added a project: All.
eddiep24 requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.
I looked through the update_llc_test_checks.py to see how the spacing is handled between prefixes. In the update_llc_test_checks.py case, the common.py file is called. More specifically, after every prefix group, the following line adds a space between comments:
if is_backend:
if len(printed_prefixes) != 0:
output_lines.append(comment_marker)
After looking at update_mir_test_checks.py, I saw that the following three lines were commented out:
if printed_prefixes:
1. Add some space between different check prefixes. output_lines.append('')
After uncommenting the code and running the code on several test files, the comment indeed indicated the correct purpose of the code.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D152333
Files:
llvm/utils/update_mir_test_checks.py
Index: llvm/utils/update_mir_test_checks.py
===================================================================
--- llvm/utils/update_mir_test_checks.py
+++ llvm/utils/update_mir_test_checks.py
@@ -235,9 +235,9 @@
break
if not func_dict[prefix][func_name]:
continue
- # if printed_prefixes:
- # # Add some space between different check prefixes.
- # output_lines.append('')
+ if printed_prefixes:
+ # Add some space between different check prefixes.
+ output_lines.append('')
printed_prefixes.add(prefix)
log("Adding {} lines for {}".format(prefix, func_name), args.verbose)
add_check_lines(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D152333.529132.patch
Type: text/x-patch
Size: 760 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230607/14ab674c/attachment.bin>
More information about the llvm-commits
mailing list