[llvm-commits] building a Dependence Graph

Preston Briggs preston.briggs at gmail.com
Wed Oct 17 17:04:20 PDT 2012


Attached is a small patch that begins the definition of a new function
pass, DependenceGraph, that will build a dependence graph for an entire
function. I'm trying to sneak up on the problem in stages, rather than
blatting out one big chunk of code, hoping to make it easier to review.

This new pass depends on the DependenceAnalysis pass to answer questions
about the dependence between pairs of instructions. There are two separate
passes because there's a useful separation of concerns. A dependence
exists if two conditions are met:

   1. Two instructions reference the same memory location, and
   2. There is a flow of control leading from one instruction to the other.

DependenceAnalysis attacks the first condition; DependenceGraph attacks
the second.

Someday it may be useful to write a different pass, called something
like LoopDependenceGraph, that would build a dependence graph for a single
loop nest. Such a pass could still rely on the DependenceAnalysis pass.

Thanks,
Preston
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121017/74626ad4/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: da.patch
Type: application/octet-stream
Size: 13467 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121017/74626ad4/attachment.obj>


More information about the llvm-commits mailing list