<div class="gmail_quote">Please cc llvm-dev in replies to llvm-dev emails.</div><div class="gmail_quote"><br></div><div class="gmail_quote">On 11 October 2011 10:31, Muthu Raj <span dir="ltr"><<a href="mailto:sameer.muthu9@gmail.com">sameer.muthu9@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div><br></div><div>Hi Nick,</div><div> Thanks for your reply.Now i need some help about how can i proceed to start writing a patch for acheiving paralellisation in llvm.</div>
</blockquote><div><br></div><div>Great!</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;"><div> I am new to open source and llvm. So please dont mind if my questions are simple. Please do reply about how i can go about writing a patch .</div>
</blockquote><div><br></div><div>Sure. I'll start by assuming you have the code checked out of SVN per the instructions in <a href="http://llvm.org/docs/GettingStarted.html#checkout">http://llvm.org/docs/GettingStarted.html#checkout</a> .</div>
<div><br></div><div>Then you just modify your code in-place.</div><div> * make sure to follow our coding standards: <a href="http://llvm.org/docs/CodingStandards.html">http://llvm.org/docs/CodingStandards.html</a>. Try hard to make your code look/feel like the rest of the code in LLVM. You'll need to read more code than you write.</div>
<div> * since you're implementing LoopDependenceAnalysis, there are certain rules it will need to follow since it will be used by a LoopPass. Read <a href="http://llvm.org/docs/WritingAnLLVMPass.html">http://llvm.org/docs/WritingAnLLVMPass.html</a>.</div>
<div> * you can use DEBUG(dbgs() << "..."); statements in your code to see what's going on inside your pass. Turn on those print statements with "opt -debug-pass=lda".</div><div> * once you've written one piece of functionality (don't wait until a large project is done; just implementing analyseMIV would be enough), write tests for it. There are two test frameworks, one which relies on running the llvm tools in test/. Most of our tests go there. The other uses the C++ API directly and is in unittests/.</div>
<div> * create the patch by running "svn diff" in the llvm source tree. The patch is plain text and should be reasonably easy to read. Make sure the patch has exactly the parts you want, in particular new files (your tests) won't be included unless you ran "svn add test/filename" on them.</div>
<div><br></div><div>Nick</div><div><br></div></div>