@@ -538,7 +538,7 @@ def gen_instr_coverage_report(path, instructions):
538
538
539
539
prefix = "def SPIRV_OC_"
540
540
existing_opcodes = [
541
- k [len (prefix ) :] for k in re .findall (prefix + "\w+" , content [1 ])
541
+ k [len (prefix ) :] for k in re .findall (prefix + r "\w+" , content [1 ])
542
542
]
543
543
existing_instructions = list (
544
544
filter (lambda inst : (inst ["opname" ] in existing_opcodes ), instructions )
@@ -597,7 +597,7 @@ def update_td_opcodes(path, instructions, filter_list):
597
597
# Extend opcode list with existing list
598
598
prefix = "def SPIRV_OC_"
599
599
existing_opcodes = [
600
- k [len (prefix ) :] for k in re .findall (prefix + "\w+" , content [1 ])
600
+ k [len (prefix ) :] for k in re .findall (prefix + r "\w+" , content [1 ])
601
601
]
602
602
filter_list .extend (existing_opcodes )
603
603
filter_list = list (set (filter_list ))
@@ -644,7 +644,7 @@ def update_td_enum_attrs(path, operand_kinds, filter_list):
644
644
suffix = "Attr"
645
645
existing_kinds = [
646
646
k [len (prefix ) : - len (suffix )]
647
- for k in re .findall (prefix + "\w+" + suffix , content [1 ])
647
+ for k in re .findall (prefix + r "\w+" + suffix , content [1 ])
648
648
]
649
649
filter_list .extend (existing_kinds )
650
650
@@ -971,15 +971,15 @@ def extract_td_op_info(op_def):
971
971
suffix = "Op"
972
972
opname = [
973
973
o [len (prefix ) : - len (suffix )]
974
- for o in re .findall (prefix + "\w+" + suffix , op_def )
974
+ for o in re .findall (prefix + r "\w+" + suffix , op_def )
975
975
]
976
976
assert len (opname ) == 1 , "more than one ops in the same section!"
977
977
opname = opname [0 ]
978
978
979
979
# Get instruction category
980
980
prefix = "SPIRV_"
981
981
inst_category = [
982
- o [len (prefix ) :] for o in re .findall (prefix + "\w+Op" , op_def .split (":" , 1 )[1 ])
982
+ o [len (prefix ) :] for o in re .findall (prefix + r "\w+Op" , op_def .split (":" , 1 )[1 ])
983
983
]
984
984
assert len (inst_category ) <= 1 , "more than one ops in the same section!"
985
985
inst_category = inst_category [0 ] if len (inst_category ) == 1 else "Op"
0 commit comments