I've enabled comments on the Google Doc to help avoid polluting the mailing list too much :)<div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Jul 31, 2012 at 8:09 PM, Sean Silva <span dir="ltr"><<a href="mailto:silvas@purdue.edu" target="_blank">silvas@purdue.edu</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br>
Thank you for writing this up! :-)<br>
<br>
A couple things:<br>
<br>
Since you're assuming zero Clang experience, I think you can leave out<br>
the git-svn stuff (since AFAIK that is only relevant for people with<br>
commit access). A simpler way to just checkout LLVM/Clang is<br>
<br>
$ git clone <a href="http://llvm.org/git/llvm.git" target="_blank">http://llvm.org/git/llvm.git</a><br>
$ cd source/tools<br>
$ git clone <a href="http://llvm.org/git/clang.git" target="_blank">http://llvm.org/git/clang.git</a><br>
<br>
The git-svn checkout stuff that you are doing looks kind of fearsome.<br>
It's easier for a newcomer to just use a pure git workflow.<br></blockquote><div><br></div><div>Good point! I meant to ask about that.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
Also, you may want to touch on the scenario that a person already has<br>
CMake installed. E.g., that it should be a certain version, needs to<br>
be compiled with certain flags, etc.<br></blockquote><div><br></div><div>On another discussion thread you mentioned that CMake needed to be compiled with an extra flag. I don't happen to know the details beyond what is written, since I set up my environment once, two months ago :)</div>
<div>Would someone be able to list what's necessary and when?</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
> Ninja dependency resolver.<br>
<br>
I would call this "Ninja build tool".<br></blockquote><div><br></div><div>Done.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
You should probably link to the LLVM commandline library docs<br>
<<a href="http://llvm.org/docs/CommandLine.html" target="_blank">http://llvm.org/docs/CommandLine.html</a>> in the relevant part of the<br>
document.<br>
<br></blockquote><div><br></div><div>Link added.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
> the loop’s index variable is compared against N - 1<br>
<br>
generally aren't half-open loops comparing against N, and not N-1? e.g.<br>
for (int I = 0, N = 10; I != N; ++I)<br>
<br></blockquote><div><br></div><div>Yes, that's correct and actually what the code implements.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
I think that just a little bit more explanation about the use of<br>
FoldingSetNodeID in areSameExpr() would be good. (just explain roughly<br>
what it does, links to docs, etc)<br></blockquote><div><br></div><div>I added a few links, along with what I understood from the FoldingSetNodeID and Stmt::Profile() documentation.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<br>
As far as your patch. My gut seems inclined to have this inside the<br>
examples/ subdirectory, since the code is really just example code to<br>
accompany the tutorial.<br></blockquote><div><br></div><div>Actually, this really is intended as the start of the loop migration tool I've been working on. I didn't just want to dump 3000 lines of code and tests in one patch, though this set is far more fine-grained than I would use for future patches. That aside, it would make sense for the tutorial to live in examples/.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
That's all for now. Thank you so much for the extensive docs!<br>
<br>
--Sean.<br>
<div><div class="h5"><br>
On Tue, Jul 31, 2012 at 6:34 PM, Sam Panzer <<a href="mailto:panzer@google.com">panzer@google.com</a>> wrote:<br>
> Hello, again!<br>
><br>
> As suggested by a few people, I have been writing up my experiences starting<br>
> development on Clang, and specifically working with Clang-based refactoring<br>
> tools. The repository where my loop converter will live doesn't exist yet,<br>
> so I will use the tutorial as a chance to start offering patches for review<br>
> (they can be rebased to other locations later).<br>
><br>
> My intention was to begin assuming zero Clang experience and work towards<br>
> building a slightly simplified version of the loop converter through a<br>
> series of fully-explained patches to Clang to a unit-tested functional tool.<br>
> Because the Getting Started page is aimed at people who want to use Clang<br>
> rather than develop for it, I began with cloning clang+llvm from the git<br>
> mirrors and preparing a cmake+ninja build.<br>
><br>
> What I have so far is currently available as a Google Doc here:<br>
> <a href="https://docs.google.com/document/d/1oTkVLhCdRJUEH1_LDaQdXqe8-aOqT5GLDL9e4MhoFF8/edit" target="_blank">https://docs.google.com/document/d/1oTkVLhCdRJUEH1_LDaQdXqe8-aOqT5GLDL9e4MhoFF8/edit</a><br>
> If enough people think that the tutorial is useful, I can eventually convert<br>
> it to a nicer format (i.e. HTML with prettier code formatting). I expect to<br>
> have made mistakes, especially in the section about obtaining and building<br>
> Clang :)<br>
><br>
> Thoughts?<br>
> -Sam<br>
><br>
</div></div>> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
><br>
</blockquote></div><br></div></div>