mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-25 11:18:27 +08:00
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,
|
||||
", ".join([arg.as_operand(type_printer) for arg in self.arguments]),
|
||||
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("}")
|
||||
return "\n".join(lines)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user