Skip to content

Commit

Permalink
cleanup prints
Browse files Browse the repository at this point in the history
  • Loading branch information
PhilippvK committed Aug 23, 2024
1 parent 33249e7 commit 4dfafa4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
6 changes: 3 additions & 3 deletions seal5/backends/riscv_register_info/writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def gen_riscv_register_info_str(set_def):
"""Generate full code for RISCVRegisterInfo.td patch for a set."""
registers = set_def.registers
register_groups = set_def.register_groups
print("registers", registers)
print("register_groups", register_groups)
# print("registers", registers)
# print("register_groups", register_groups)
group_regs = {group_name: group.names for group_name, group in register_groups.items()}
all_group_regs = [name for names in group_regs.values() for name in names]
ret = []
Expand Down Expand Up @@ -67,7 +67,7 @@ def gen_riscv_register_info_str(set_def):
raise ValueError(f"Unhandled case: {reg.reg_class}")
# width = reg.width
# TODO: use width?
print("ret", ret)
# print("ret", ret)
return "\n".join(ret)


Expand Down
12 changes: 6 additions & 6 deletions seal5/transform/detect_inouts/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,10 +94,10 @@ def run(args):
elif op_name in context.writes:
if seal5.model.Seal5OperandAttribute.OUT not in instr_def.attributes:
op_def.attributes[seal5.model.Seal5OperandAttribute.OUT] = []
print("---")
print("instr_def.scalars.keys()", instr_def.scalars.keys())
# print("---")
# print("instr_def.scalars.keys()", instr_def.scalars.keys())
for reg_name in context.reads:
print("reg_name1", reg_name)
# print("reg_name1", reg_name)
if reg_name in instr_def.operands.keys():
continue
if reg_name in instr_def.scalars.keys():
Expand All @@ -110,7 +110,7 @@ def run(args):
# TODO: drop duplicates?
instr_def.attributes[seal5.model.Seal5InstrAttribute.USES] = uses
for reg_name in context.writes:
print("reg_name2", reg_name)
# print("reg_name2", reg_name)
if reg_name in instr_def.operands.keys():
continue
if reg_name in instr_def.scalars.keys():
Expand All @@ -122,8 +122,8 @@ def run(args):
defs.append(reg_name)
# TODO: drop duplicates?
instr_def.attributes[seal5.model.Seal5InstrAttribute.DEFS] = defs
print("instr_def.operands_", instr_def.operands)
print("instr_def.attributes", instr_def.attributes)
# print("instr_def.operands_", instr_def.operands)
# print("instr_def.attributes", instr_def.attributes)
# input("999")

logger.info("dumping model")
Expand Down
4 changes: 2 additions & 2 deletions seal5/transform/detect_registers.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ def run(args):
continue
logger.info("processing set %s", set_name)
detect_registers(set_def)
print("set_def.register", set_def.registers)
print("set_def.register_groups", set_def.register_groups)
# print("set_def.register", set_def.registers)
# print("set_def.register_groups", set_def.register_groups)
# input("@")

logger.info("dumping model")
Expand Down

0 comments on commit 4dfafa4

Please sign in to comment.