disabled optimizer prints
This commit is contained in:
@@ -21,7 +21,7 @@ class Optimizer:
|
|||||||
self.rules: list[PeepholeRule] = []
|
self.rules: list[PeepholeRule] = []
|
||||||
|
|
||||||
def match_instruction(self, pattern: Instruction, instr: Instruction, bindings: Dict[str, str]) -> bool:
|
def match_instruction(self, pattern: Instruction, instr: Instruction, bindings: Dict[str, str]) -> bool:
|
||||||
print(pattern.opcode == instr.opcode, instr.opcode, instr.operands, pattern.opcode)
|
#print(pattern.opcode == instr.opcode, instr.opcode, instr.operands, pattern.opcode)
|
||||||
if pattern.opcode != instr.opcode:
|
if pattern.opcode != instr.opcode:
|
||||||
return False
|
return False
|
||||||
if len(pattern.operands) != len(instr.operands):
|
if len(pattern.operands) != len(instr.operands):
|
||||||
@@ -89,7 +89,7 @@ class Optimizer:
|
|||||||
matched = True
|
matched = True
|
||||||
break
|
break
|
||||||
if not matched:
|
if not matched:
|
||||||
print('next')
|
#print('next')
|
||||||
i += 1
|
i += 1
|
||||||
|
|
||||||
self.lines = [f"{line.opcode} {', '.join(line.operands)}\n" for line in self.lines]
|
self.lines = [f"{line.opcode} {', '.join(line.operands)}\n" for line in self.lines]
|
||||||
|
Reference in New Issue
Block a user