<div dir="ltr"><div dir="ltr"></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jan 11, 2021 at 8:07 PM Stefanos Baziotis via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Deep,<br><br>1) Kind of. There's Doxygen generated from source automatically, which shows you many things e.g., members of a type along with some short documentation (which is taken from the code). It also shows you the inheritance tree related to this type<div>Here's an example: <a href="https://llvm.org/doxygen/classllvm_1_1LoopInfo.html" target="_blank">https://llvm.org/doxygen/classllvm_1_1LoopInfo.html</a></div><div>It doesn't really matter what this is for now, but you can see e.g., that LoopInfo inherits from LoopInfoBase. If you scroll down, you can click to different members and go to a more detailed description further down. You can open the dropdown menus (e.g., public</div><div>functions inherited). And finally, at the top, you can see the file it appears at. In general, I think that if you start clicking stuff, it's going to make sense, it's relatively intuitive.</div><div><br></div><div>2) Try minimizing the number of parallel threads used. I think by default Ninja uses all the available threads which in most machines will fill up the RAM. To limit them, use the -j argument like this: ninja -j8</div><div>Another thing that will probably be useful in general is that you can choose to build specific sub-projects instead of building the whole thing, like this: ninja -j8 opt</div></div></blockquote><div><br></div><div>You can also use -D<span style="color:rgb(0,0,0);font-family:"Lucida Grande","Lucida Sans Unicode",Geneva,Verdana,sans-serif;font-size:14px">LLVM_PARALLEL_LINK_JOBS=<number> </span>on your cmake command to limit just the number of linking jobs that can run in parallel. -DCMAKE_BUILD_TYPE=Release -DLLVM_ENABLE_ASSERTIONS=ON can be a useful build configuration that you gets you debug logging and assertions, but you won't have debug symbols for gdb. There's also <span style="color:rgb(0,0,0);font-family:"Lucida Grande","Lucida Sans Unicode",Geneva,Verdana,sans-serif;font-size:14px">-DLLVM_USE_SPLIT_DWARF. </span>All of these options are covered here <a href="https://llvm.org/docs/GettingStarted.html#common-problems">https://llvm.org/docs/GettingStarted.html#common-problems</a></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div><div>3) Ok, first of all, if you only care about editing and not debugging LLVM (i.e. launching it with a debugger like gdb), then editors like Vim, Emacs, 4coder, maybe Sublime Text should do the job. I think most people</div><div>developing LLVM on Linux use something like this.</div><div><br></div><div>Now, if you're interested in IDEs and / or debuggers, well, the news in Linux is bad IMHO. For example, in my machine, GDB takes _30 seconds_ to launch the debug build of opt.</div><div>So, I couldn't use any IDE because virtually all use GDB under the hood. Personally, I switched to Windows + Visual Studio just for this reason. That was an insane productivity boost for me.</div><div>But if you need something that works in Linux, you can maybe try LLDB. Hopefully it will be faster. If yes, you can maybe try hooking it in an IDE, which I guess won't be trivial.</div><div><br></div><div>That said, as I don't develop LLVM in Linux, other people might have better suggestions.</div><div><br></div><div>Best,</div><div>Stefanos</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Στις Τρί, 12 Ιαν 2021 στις 5:43 π.μ., ο/η Deep Majumder via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> έγραψε:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hello everyone,</div><div>I have been studying the LLVM IR and now want to get into LLVM development. I have a few questions regarding that and I would be really grateful to get answers for:</div><div><br></div><div>1) The LangRef is an excellent guide/reference to the IR. Is there something similar for the codebase (the core llvm to be specific)? Or do I have to generate that from the source, in which case how do I do that?</div><div>2) I tried building just the llvm sub-project, and that is filling up my RAM completely during the linking stages, and sends my laptop thrashing. I am using Ninja. Is there a way to mitigate this? (I am on Ubuntu 20.04 Linux, 8 GM RAM, 8 GM swap on an HDD).</div><div>3) VSCode, at least on my laptop, is very sluggish with such large a project. Is there any recommended development environment for Linux (or at least something that has been found to work well)?</div><div><br></div><div>Thank you for your time!</div><div>Regards,</div><div>Deep<br></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>