Hi Satya,<div><br><br><div class="gmail_quote">On Tue, Jul 13, 2010 at 12:06 PM, Satya Jandhayala <span dir="ltr"><<a href="mailto:satya_jandhayala@yahoo.com">satya_jandhayala@yahoo.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font:inherit"><div>Hi,</div>
<div> </div>
<div>I developed a Loop Interchange pass. Please take a look.</div>
<div>I have not incorporate data dependence analysis check. I can insert it when the LoopDependenceAnalysis is available.</div></td></tr></tbody></table></blockquote><div><br></div><div>Have you tried using include/llvm/Analysis/LoopDependenceAnalysis.h ?</div>
<div><br></div><div>Please include all the changes listed in README.txt in the patch along with a test case that is in .ll form. It makes easier to review such complete patch.</div><div><br></div><div>Few general comments and initial thoughts.</div>
<div><br></div><div>- Stay within 80 columns</div><div>- Add comment before each function def.</div><div>- Use at least one vertical space between function def.</div><div>- There is cut-n-paste error in runOnLoop() where the code checks LCSSA form.</div>
<div><br></div><div>>   std::vector<std::pair<Loop*,Loop*> > interchangedLoops;</div><div><br></div><div>This may not be the most reliable way to keep track of interchangedLoops. This vector must be recomputed if loop info is recreated.  It must be updated if a loop is replaced or deleted by another pass.</div>
<div><br></div><div><br></div><div>> void LoopInterchange::updateDominators ...</div><div><br></div><div>However the pass does not preserve dominators info. </div><div><br></div><div>> void LoopInterchange::removeChildLoop</div>
<div><br></div><div>It is a good idea to use another name for this method to avoid any confusion with Loop::removeChildLoop.</div><div><br></div><div>What is the difference between updateSSA() and updateSSAAgain() ?</div>
<div>-</div></div>Devang<br>
</div>