add pack=true attribute to graphviz graph
authorJacob Lifshay <programmerjake@gmail.com>
Tue, 6 Dec 2022 07:21:49 +0000 (23:21 -0800)
committerJacob Lifshay <programmerjake@gmail.com>
Tue, 6 Dec 2022 07:21:49 +0000 (23:21 -0800)
src/bigint_presentation_code/_tests/test_register_allocator.py
src/bigint_presentation_code/register_allocator.py

index 7db07962728a650567953de9ba4ff02d38e55d12..9cf6270e581e2cfc2595cce0a96513f6c633de3f 100644 (file)
@@ -264,6 +264,7 @@ class TestRegisterAllocator(unittest.TestCase):
         self.assertEqual(graphs, {
             'initial':
             'graph {\n'
+            '    graph [pack = true]\n'
             '    "0" [label = "<arg.outputs[0]: <I64>>: 0"]\n'
             '    "1" [label = "<arg.out0.copy.outputs[0]: <I64>>: 0"]\n'
             '    "2" [label = "<vl.outputs[0]: <VL_MAXVL>>: 0"]\n'
index 6e7d87c27948a5e5a1abd6fec3cece7772f2a334..94de331e6862efd22039c64c03a51bd87c1533f9 100644 (file)
@@ -474,7 +474,10 @@ class InterferenceGraph:
                 # both directions
                 if edge_key not in edges and edge_key[::-1] not in edges:
                     edges[edge_key] = edge
-        lines = ["graph {"]
+        lines = [
+            "graph {",
+            "    graph [pack = true]",
+        ]
         for node, node_id in node_ids.items():
             label_lines = []  # type: list[str]
             for k, v in node.merged_ssa_val.ssa_val_offsets.items():