@@ -536,7 +536,7 @@ def gen_instr_coverage_report(path, instructions):
536
536
537
537
content = content .split (AUTOGEN_OPCODE_SECTION_MARKER )
538
538
539
- existing_opcodes = [k [11 :] for k in re .findall ("def SPIRV_OC_\w+" , content [1 ])]
539
+ existing_opcodes = [k [11 :] for k in re .findall (r "def SPIRV_OC_\w+" , content [1 ])]
540
540
existing_instructions = list (
541
541
filter (lambda inst : (inst ["opname" ] in existing_opcodes ), instructions )
542
542
)
@@ -594,7 +594,7 @@ def update_td_opcodes(path, instructions, filter_list):
594
594
# Extend opcode list with existing list
595
595
prefix = "def SPIRV_OC_"
596
596
existing_opcodes = [
597
- k [len (prefix ) :] for k in re .findall (prefix + "\w+" , content [1 ])
597
+ k [len (prefix ) :] for k in re .findall (prefix + r "\w+" , content [1 ])
598
598
]
599
599
filter_list .extend (existing_opcodes )
600
600
filter_list = list (set (filter_list ))
@@ -637,7 +637,7 @@ def update_td_enum_attrs(path, operand_kinds, filter_list):
637
637
assert len (content ) == 3
638
638
639
639
# Extend filter list with existing enum definitions
640
- existing_kinds = [k [8 :- 4 ] for k in re .findall ("def SPIRV_\w+Attr" , content [1 ])]
640
+ existing_kinds = [k [8 :- 4 ] for k in re .findall (r "def SPIRV_\w+Attr" , content [1 ])]
641
641
filter_list .extend (existing_kinds )
642
642
643
643
capability_mapping = get_capability_mapping (operand_kinds )
@@ -959,12 +959,12 @@ def extract_td_op_info(op_def):
959
959
- A dict containing potential manually specified sections
960
960
"""
961
961
# Get opname
962
- opname = [o [8 :- 2 ] for o in re .findall ("def SPIRV_\w+Op" , op_def )]
962
+ opname = [o [8 :- 2 ] for o in re .findall (r "def SPIRV_\w+Op" , op_def )]
963
963
assert len (opname ) == 1 , "more than one ops in the same section!"
964
964
opname = opname [0 ]
965
965
966
966
# Get instruction category
967
- inst_category = [o [4 :] for o in re .findall ("SPIRV_\w+Op" , op_def .split (":" , 1 )[1 ])]
967
+ inst_category = [o [4 :] for o in re .findall (r "SPIRV_\w+Op" , op_def .split (":" , 1 )[1 ])]
968
968
assert len (inst_category ) <= 1 , "more than one ops in the same section!"
969
969
inst_category = inst_category [0 ] if len (inst_category ) == 1 else "Op"
970
970
0 commit comments