I've written a dependence analyzer for LLVM. It's a fairly complete implementation of the paper<div><br></div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px"><div>Practical Dependence Testing</div>
<div>Gina Goff, Ken Kennedy, and Chau-Wen Tseng</div><div>PLDI 1991</div></blockquote><br></div><div>It lacks an MIV test and cannot yet propagate constraints between coupled RDIV subscripts (discussed in Section 5.3.2 of the paper). I expect to add these in the future.</div>
<div><br></div><div>It's organized as a FunctionPass with a single entry point that supports testing for dependence between two instructions in a function. If there's no dependence, it returns null. If there's a dependence, it returns a pointer to a Dependence which can be queried about details (what kind of dependence, is it loop independent, direction and distance vector entries, etc). I haven't included every imaginable feature, but there's a good selection that should be adequate for supporting many loop transformations. Of course, it can be extended as necessary.</div>
<div><br></div><div>How do I go about getting it ready for check in?</div><div><br></div><div>Thanks,</div><div>Preston</div><div><br></div>