mirror of https://github.com/m-labs/artiq.git
compiler.ir: print even blocks without predecessors.
This commit is contained in:
parent
d92b3434a0
commit
a4525b21cf
|
@ -479,8 +479,12 @@ class Function:
|
||||||
type_printer.name(self.type.ret), self.name,
|
type_printer.name(self.type.ret), self.name,
|
||||||
", ".join([arg.as_operand(type_printer) for arg in self.arguments]),
|
", ".join([arg.as_operand(type_printer) for arg in self.arguments]),
|
||||||
type_printer.name(self.type)))
|
type_printer.name(self.type)))
|
||||||
for block in reversed(postorder):
|
|
||||||
|
postorder_blocks = list(reversed(postorder))
|
||||||
|
orphan_blocks = [block for block in self.basic_blocks if block not in postorder]
|
||||||
|
for block in postorder_blocks + orphan_blocks:
|
||||||
lines.append(block.as_entity(type_printer))
|
lines.append(block.as_entity(type_printer))
|
||||||
|
|
||||||
lines.append("}")
|
lines.append("}")
|
||||||
return "\n".join(lines)
|
return "\n".join(lines)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue