mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 13:00:15 +02:00
json_ir_generator: Turn IROpNameMap into a set
This is only used to track for duplicates, so we only really need the key name, since the values are never used.
This commit is contained in:
1 parent
d4fad0a3b0
commit
3165dce89e
1 file changed
+3
-3
@@ -96,7 +96,7 @@ IRTypesToCXX: dict[str, IRType] = {}
|
||||
CXXTypeToIR: dict[str, IRType] = {}
|
||||
IROps: list[OpDefinition] = []
|
||||
|
||||
IROpNameMap: dict[str, int] = {}
|
||||
IROpNameSet: set[str] = set()
|
||||
|
||||
def is_ssa_type(op_type: str):
|
||||
return op_type in {"SSA", "GPR", "GPRPair", "FPR"}
|
||||
@@ -288,11 +288,11 @@ def parse_ops(ops):
|
||||
#OpDef.print()
|
||||
|
||||
# Error on duplicate op
|
||||
if OpDef.Name in IROpNameMap:
|
||||
if OpDef.Name in IROpNameSet:
|
||||
ExitError("Duplicate Op defined! {}".format(OpDef.Name))
|
||||
|
||||
IROps.append(OpDef)
|
||||
IROpNameMap[OpDef.Name] = 1
|
||||
IROpNameSet.add(OpDef.Name)
|
||||
|
||||
# Print out enum values
|
||||
def print_enums(enums):
|
||||
|
||||
Reference in new issue
Block a user