Esempio n. 1
0
File: ssaviz.py Progetto: ASPP/numba
def render_ssa(cfflow, symtab, output_file):
    "Render the SSA graph given the flow.CFGFlow and the symbol table"
    cfstats = [stat for b in cfflow.blocks for stat in b.stats]
    defs = [stat.lhs.variable for stat in cfstats
                                  if isinstance(stat, NameAssignment)]
    nodes = symtab.values() + defs
    render(nodes, output_file, SSAGraphAdaptor(), SSAGraphRenderer())
Esempio n. 2
0
def render_ssa(cfflow, symtab, output_file):
    "Render the SSA graph given the flow.CFGFlow and the symbol table"
    cfstats = [stat for b in cfflow.blocks for stat in b.stats]
    defs = [
        stat.lhs.variable for stat in cfstats
        if isinstance(stat, NameAssignment)
    ]
    nodes = symtab.values() + defs
    render(nodes, output_file, SSAGraphAdaptor(), SSAGraphRenderer())
Esempio n. 3
0
def render_cfg(cfflow, output_file):
    "Render the SSA graph given the flow.CFGFlow and the symbol table"
    graphviz.render(cfflow.blocks, output_file, CFGGraphAdaptor(),
                    CFGGraphRenderer())
Esempio n. 4
0
def render_ast(ast, output_file):
    render([ast], output_file, ASTGraphAdaptor(), ASTGraphRenderer())
Esempio n. 5
0
def render_ast(ast, output_file):
    render([ast], output_file, ASTGraphAdaptor(), ASTGraphRenderer())
Esempio n. 6
0
def render_cfg(cfflow, output_file):
    "Render the SSA graph given the flow.CFGFlow and the symbol table"
    graphviz.render(cfflow.blocks, output_file, CFGGraphAdaptor(), CFGGraphRenderer())