Skip to content

Commit 43ded5b

Browse files
committed
Update ADVERT_END note and remove the list of dialects
1 parent 70cb5b6 commit 43ded5b

File tree

1 file changed

+8
-11
lines changed

1 file changed

+8
-11
lines changed

mlir/utils/generate-test-checks.py

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -35,24 +35,21 @@
3535

3636
ADVERT_BEGIN = "// NOTE: Assertions have been autogenerated by "
3737
ADVERT_END = """
38-
// The script is designed to make adding checks to
39-
// a test case fast, it is *not* designed to be authoritative
40-
// about what constitutes a good test! The CHECK should be
41-
// minimized and named to reflect the test intent.
38+
// This script is intended to make adding checks to a test case quick and easy.
39+
// It is *not* authoritative about what constitutes a good test. After using the
40+
// script, be sure to review and refine the generated checks. For example,
41+
// CHECK lines should be minimized and named to reflect the test’s intent.
42+
// For comprehensive guidelines, see:
43+
// * https://mlir.llvm.org/getting_started/TestingGuide/
4244
"""
4345

4446

4547
# Regex command to match an SSA identifier.
4648
SSA_RE_STR = "[0-9]+|[a-zA-Z$._-][a-zA-Z0-9$._-]*"
4749
SSA_RE = re.compile(SSA_RE_STR)
4850

49-
# Regex matching `dialect.op_name`, where `dialect` is an upstream MLIR
50-
# dialect (e.g. `vector.transfer_read`).
51-
DIALECTS = "acc|affine|amdgpu|amx|arith|arm_neon|arm_sve|arm_sme|async|bufferization|cf|complex|dlti|emitc|\
52-
func|gpu|index|irdl|linalg|llvm|math|memref|ml_program|mpi|nvgpu|nvvm|omp|pdl_interp|pdl|ptr|quant|\
53-
rocdl|scf|shape|shard|smt|sparse_tensor|tensor|ub|vcix|vector|wasmssa|x86vector|xegpu|xevm|spirv|tosa|\
54-
transform"
55-
SSA_OP_NAME_RE = re.compile(rf"\b(?:{DIALECTS})[.]([a-z_]+)\b")
51+
# Regex matching `dialect.op_name` (e.g. `vector.transfer_read`).
52+
SSA_OP_NAME_RE = re.compile(r"\b(?:\s=\s[a-z_]+)[.]([a-z_]+)\b")
5653

5754
# Regex matching the left-hand side of an assignment
5855
SSA_RESULTS_STR = r'\s*(%' + SSA_RE_STR + r')(\s*,\s*(%' + SSA_RE_STR + r'))*\s*='

0 commit comments

Comments
 (0)