正在加载图片...
Control Flow Graph A control flow graph (or flow graph)G is defined as a finite set N of nodes and a finite set E of edges.An edge(i,j)in E connects two nodes ni and nj in N.We often write G=(N,E)to denote a flow Graph G with nodes given by N and edges by E. .G=(N,E)as a directed graph Node n E N:basic blocks A basic block is a maximal sequence of stmts with a single entry point,single exit point,and no internal branches For simplicity,we assume a unique entry node no and a unique exit node n in later discussions Edge e=(ni,nj)EE:possible transfer of control from block ni to block nj We also assume that there is a node labeled Start in N that has no incoming edge,and another node labeled End,also in N,that has no outgoing edge. 99 Control Flow Graph • A control flow graph (or flow graph) G is defined as a finite set N of nodes and a finite set E of edges. An edge (i, j) in E connects two nodes 𝑛𝑖 and 𝑛𝑗 in N. We often write G=(N, E) to denote a flow Graph G with nodes given by N and edges by E. • G = (N, E) as a directed graph ➢ Node n ∈ N: basic blocks ✓ A basic block is a maximal sequence of stmts with a single entry point, single exit point, and no internal branches ✓ For simplicity, we assume a unique entry node 𝑛0 and a unique exit node 𝑛𝑓 𝑖𝑛 𝑙𝑎𝑡𝑒𝑟 𝑑𝑖𝑠𝑐𝑢𝑠𝑠𝑖𝑜𝑛𝑠 ➢ Edge e = (𝑛𝑖 , 𝑛𝑗 ) ∈ E: possible transfer of control from block 𝑛𝑖 to block 𝑛𝑗 • We also assume that there is a node labeled Start in N that has no incoming edge, and another node labeled End, also in N, that has no outgoing edge
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有