Skip to content

Commit b241a99

Browse files
committed
Rename option to check-inst-comments
1 parent 4631c34 commit b241a99

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

llvm/utils/UpdateTestChecks/common.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2090,7 +2090,7 @@ def add_checks(
20902090
global_tbaa_records_for_prefixes={},
20912091
preserve_names=False,
20922092
original_check_lines: Mapping[str, List[str]] = {},
2093-
check_comments=True,
2093+
check_inst_comments=True,
20942094
):
20952095
# prefix_exclusions are prefixes we cannot use to print the function because it doesn't exist in run lines that use these prefixes as well.
20962096
prefix_exclusions = set()
@@ -2288,8 +2288,8 @@ def add_checks(
22882288
global_tbaa_records,
22892289
preserve_names,
22902290
original_check_lines=original_check_lines.get(checkprefix),
2291-
# IR output might require comments checks, e.g., predicate info, memssa
2292-
ignore_all_comments=not check_comments,
2291+
# IR output might require comments checks, e.g., print-predicate-info, print<memssa>
2292+
ignore_all_comments=not check_inst_comments,
22932293
)
22942294

22952295
# This could be selectively enabled with an optional invocation argument.
@@ -2309,7 +2309,7 @@ def add_checks(
23092309
if func_line.strip() == "":
23102310
is_blank_line = True
23112311
continue
2312-
if not check_comments:
2312+
if not check_inst_comments:
23132313
# Do not waste time checking IR comments unless necessary.
23142314
func_line = SCRUB_IR_COMMENT_RE.sub(r"", func_line)
23152315

@@ -2353,7 +2353,7 @@ def add_ir_checks(
23532353
global_vars_seen_dict,
23542354
global_tbaa_records_for_prefixes,
23552355
is_filtered,
2356-
check_comments=False,
2356+
check_inst_comments=False,
23572357
original_check_lines={},
23582358
):
23592359
assert ginfo.is_ir()
@@ -2380,7 +2380,7 @@ def add_ir_checks(
23802380
global_tbaa_records_for_prefixes,
23812381
preserve_names,
23822382
original_check_lines=original_check_lines,
2383-
check_comments=check_comments,
2383+
check_inst_comments=check_inst_comments,
23842384
)
23852385

23862386

llvm/utils/update_test_checks.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ def update_test(ti: common.TestInfo):
197197
global_tbaa_records_for_prefixes,
198198
is_filtered=builder.is_filtered(),
199199
original_check_lines=original_check_lines.get(func, {}),
200-
check_comments=args.check_comments,
200+
check_inst_comments=args.check_inst_comments,
201201
),
202202
)
203203
)
@@ -231,7 +231,7 @@ def update_test(ti: common.TestInfo):
231231
global_tbaa_records_for_prefixes,
232232
is_filtered=builder.is_filtered(),
233233
original_check_lines=original_check_lines.get(func_name, {}),
234-
check_comments=args.check_comments,
234+
check_inst_comments=args.check_inst_comments,
235235
)
236236
)
237237
is_in_function_start = False
@@ -365,10 +365,10 @@ def main():
365365
help="Check global entries (global variables, metadata, attribute sets, ...) for functions",
366366
)
367367
parser.add_argument(
368-
"--check-comments",
368+
"--check-inst_comments",
369369
action="store_true",
370370
default=False,
371-
help="Check the generated comments (e.g., PredicateInfo/MemSSA) for functions",
371+
help="Check the generated comments describing instructions (e.g., -print-predicate-info/print<memssa>)",
372372
)
373373
parser.add_argument(
374374
"--reset-variable-names",

0 commit comments

Comments
 (0)