Hi, I developed a Loop Interchange pass. Please take a look. I have not incorporate data dependence analysis check. I can insert it when the LoopDependenceAnalysis is available. Thank you Satya -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100713/654d5fd5/attachment.html> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: sum.c URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100713/654d5fd5/attachment.c> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: t.c URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100713/654d5fd5/attachment-0001.c> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: README.txt URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100713/654d5fd5/attachment.txt> -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: LoopInterchange.cpp URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100713/654d5fd5/attachment.ksh>
Owen, comments? Evan On Jul 13, 2010, at 12:06 PM, Satya Jandhayala wrote:> Hi, > > I developed a Loop Interchange pass. Please take a look. > I have not incorporate data dependence analysis check. I can insert it when the LoopDependenceAnalysis is available. > > Thank you > Satya > > <sum.c><t.c><README.txt><LoopInterchange.cpp>_______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100713/b501ea96/attachment.html>
Hi Satya, On Tue, Jul 13, 2010 at 12:06 PM, Satya Jandhayala < satya_jandhayala at yahoo.com> wrote:> Hi, > > I developed a Loop Interchange pass. Please take a look. > I have not incorporate data dependence analysis check. I can insert it when > the LoopDependenceAnalysis is available. >Have you tried using include/llvm/Analysis/LoopDependenceAnalysis.h ? 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. Few general comments and initial thoughts. - Stay within 80 columns - Add comment before each function def. - Use at least one vertical space between function def. - There is cut-n-paste error in runOnLoop() where the code checks LCSSA form.> std::vector<std::pair<Loop*,Loop*> > interchangedLoops;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.> void LoopInterchange::updateDominators ...However the pass does not preserve dominators info.> void LoopInterchange::removeChildLoopIt is a good idea to use another name for this method to avoid any confusion with Loop::removeChildLoop. What is the difference between updateSSA() and updateSSAAgain() ? - Devang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100714/4e03a9f0/attachment.html>
Hi Devang, Thanks for the feed back. I took care of function naming and limiting comments to 80 columns. I am looking into implementing Loop Dependence Analysis. As of release 2.7 no data dependence analysis is being done. Satya --- On Wed, 7/14/10, Devang Patel <devang.patel at gmail.com> wrote: From: Devang Patel <devang.patel at gmail.com> Subject: Re: [LLVMdev] LoopInterchange Pass To: "Satya Jandhayala" <satya_jandhayala at yahoo.com> Cc: llvmdev at cs.uiuc.edu Date: Wednesday, July 14, 2010, 11:21 AM Hi Satya, On Tue, Jul 13, 2010 at 12:06 PM, Satya Jandhayala <satya_jandhayala at yahoo.com> wrote: Hi, I developed a Loop Interchange pass. Please take a look. I have not incorporate data dependence analysis check. I can insert it when the LoopDependenceAnalysis is available. Have you tried using include/llvm/Analysis/LoopDependenceAnalysis.h ? 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. Few general comments and initial thoughts. - Stay within 80 columns - Add comment before each function def. - Use at least one vertical space between function def. - There is cut-n-paste error in runOnLoop() where the code checks LCSSA form.> std::vector<std::pair<Loop*,Loop*> > interchangedLoops;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.> void LoopInterchange::updateDominators ...However the pass does not preserve dominators info.> void LoopInterchange::removeChildLoopIt is a good idea to use another name for this method to avoid any confusion with Loop::removeChildLoop. What is the difference between updateSSA() and updateSSAAgain() ? -Devang -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100717/8d3b8889/attachment.html>
On Jul 13, 2010, at 12:06 PM, Satya Jandhayala wrote:> Hi, > > I developed a Loop Interchange pass. Please take a look. > I have not incorporate data dependence analysis check. I can insert it when the LoopDependenceAnalysis is available.Hello Satya, Besides dependence analysis, the other main thing that appears to be missing before this code is generally usable is code to decide when interchange is likely to be profitable. A simple heuristic which just aims to put loops that drive stride-one memory accesses on the inside would probably go a long way, given that LLVM isn't doing many other loop restructuring optimizations at this time. Dan