-
Notifications
You must be signed in to change notification settings - Fork 136
LLVM Dependence Graph
Marek Chalupa edited this page Oct 16, 2015
·
1 revision
We have implemented a dependence graph for LLVM byte code. For building the graph you need three parts:
- the graph itself (nodes)
- data dependence edges
- control dependence edges
The graph is built dynamically, so that it is as small as possible. We start building from the main function and recursively build it when we find a function call. This process can be invoked again during points-to analysis due to calls via function pointers. The graph itself is composed from a main graph and procedures subgraphs. Every subgraph (including the main graph) has formal parameters that contain arguments of the function and globals that can be used in the subgraph (or in subgraph's subgraphs). For simplicity, we could just add all globals as parameters, but we want to keep the graph as small as possible.