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:
Lioncache committed 2025-10-04 11:00:00 -04:00
1 parent d4fad0a3b0
commit 3165dce89e
1 file changed
+3 -3
+3 -3
View File
@@ -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):