Explorar el Código

Fix a bug in CFG lowering

jonathanvdc hace 8 años
padre
commit
1e243c37b7
Se han modificado 1 ficheros con 3 adiciones y 1 borrados
  1. 3 1
      kernel/modelverse_jit/cfg_to_tree.py

+ 3 - 1
kernel/modelverse_jit/cfg_to_tree.py

@@ -42,7 +42,9 @@ class FlowGraphComponent(object):
 def create_graph_component(entry_point):
     """Creates a flow graph component from the given entry point."""
     reachable = cfg_optimization.get_all_reachable_blocks(entry_point)
-    return FlowGraphComponent([entry_point], reachable[entry_point], reachable)
+    all_blocks = set(reachable[entry_point])
+    all_blocks.add(entry_point)
+    return FlowGraphComponent([entry_point], all_blocks, reachable)
 
 class SimpleBlock(object):
     """A 'simple' block in the relooper algorithm."""