Commit 61fbae09 authored by Dan Moldovan's avatar Dan Moldovan Committed by TensorFlower Gardener
Browse files

Several improvements required by downstream analyses, detailed below.

Add additional structures to the CFG which track links for higher level statements (which usually aggregate multiple CFG nodes). These allow drawing edges between blocks like if statements and other CFG nodes.

Add support for closures. This is dont by including function definition nodes into the graph. CFGs are built on a per-function basis and are generally independent (we ignore flow dur to function calls). These nodes allow connecting these independent CFG at dataflow analysis (e.g. the variables that a function closes over are live into the definition of the function).

Additional minor updates:
 * changed the string representation to better comply with the DOT format
 * force visitor subclasses to define a state initializer
 * slightly modify the visitor interface to allow the user to manipulate state before the actual visit

PiperOrigin-RevId: 204316850
parent f50416cc
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment