<div dir="ltr">Another option would be to take some existing passes and reimplement them in a useful way in MLIR. Even some<div> elatively simple passes (like mem2reg/reg2mem) could be useful in the MLIR standard dialect, for instance,</div><div>but no one has taken the time to do the implementation.<div><br></div><div>Steve</div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Dec 15, 2020 at 7:27 PM amit kumar 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">Thank you so know to guide me towards my first step, I'm going through<br>
your suggested step and will let you know if I face any problem. and<br>
last but not least these kinds of quick help/replies really give<br>
motivation to beginners like me towards open-source contribution.<br>
<br>
Thanks and regards<br>
Amit Kumar<br>
<br>
On Wed, Dec 16, 2020 at 8:12 AM Armand Behroozi <<a href="mailto:armandb@umich.edu" target="_blank">armandb@umich.edu</a>> wrote:<br>
><br>
> Hey Amit,<br>
><br>
> EECS583 at Umich also has a homework assignment or two that you could give a go if you wanted.<br>
> HW2 asks you to extend the loop invariant code motion pass and do frequent path LICM (hoist almost invariant code).<br>
><br>
> Link below.<br>
> <a href="https://web.eecs.umich.edu/~mahlke/courses/583f18/homeworks.html" rel="noreferrer" target="_blank">https://web.eecs.umich.edu/~mahlke/courses/583f18/homeworks.html</a><br>
><br>
> It's just another resource.<br>
><br>
> Best of luck.<br>
><br>
> Regards,<br>
><br>
> Armand<br>
><br>
> On Tue, Dec 15, 2020 at 4:18 PM Stefanos Baziotis via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br>
>><br>
>> Hi Amit,<br>
>><br>
>> There are the bugs tagged beginner but last time I checked, IMHO, they were not that "beginner-friendly" after all.<br>
>><br>
>> The way I would recommend that you start with LLVM is by rewriting a pass. One thing to note here is that this is not really a contribution (i.e.<br>
>> a commit won't result immediately from that), so if you're only interested in contributing something with your first try, that won't do it.<br>
>><br>
>> But a common theme I see among beginners, including myself when I started, is that when you're obsessed with landing a commit,<br>
>> unavoidably you're going to "hack your way towards it". That basically means that you'll just gather relatively shallow knowledge, maybe<br>
>> with some breadth, but that limited too, just to commit something. That's bad and it will probably not serve you in the long run.<br>
>><br>
>> This is why for example, in courses which use LLVM as a teaching tool, the assignments don't ask you to do something<br>
>> shallow like that but instead they ask for something that requires some kind of deep knowledge and thought (which you develop along).<br>
>><br>
>> To that end, I recommend rewriting a pass (which is btw somewhat common in courses). Now, that might sound scary but it's not.<br>
>> The _actual_ goal is not to actually rewrite the pass. Neither all of it, nor at the production level of LLVM. Rewriting<br>
>> the pass is just an "artificial goal" only to have something to move towards. The _actual_ goal is what you'll learn by moving<br>
>> towards this goal. And what you'll learn will probably be both deep and broad.<br>
>><br>
>> You only need to start simple, like "OK, how do I query this analysis?". Just that, then you try something like "hmm, how can I inspect / traverse<br>
>> the results of this analysis" etc. (and the good thing is that for a lot of these first steps, multiple other passes will have done the exact<br>
>> same thing and you should feel free to copy code shamelessly as you're starting out).<br>
>><br>
>> After some time doing that, you'll find that you start understanding the system in some detail and _then_, you'll be equipped to do actual commits.<br>
>><br>
>> Now, the question is with which pass to start with? Again, because of the above, that doesn't really matter, but in any case, it depends on what you like.<br>
>> For example, if you're interested in loops, I'd start with LCSSA (and along with it, I'd give a try to the LLVM Loop Terminology). If you're interested<br>
>> in inter-procedural optimizations, I'd start with Sparse Conditional Constant Propagation (SCCP).<br>
>><br>
>> If you have no idea where to start or what you like, you might start with Scalar Replacement of Aggregates (SROA), just because I saw it<br>
>> in a cool course on UIUC recently and it seems to guide you relatively well. Here's the link: <a href="http://misailo.web.engr.illinois.edu/courses/526-sp20/" rel="noreferrer" target="_blank">http://misailo.web.engr.illinois.edu/courses/526-sp20/</a>,<br>
>> it's project 1 (again, don't need to even do the whole thing, do the parts that motivate you; I mean please don't treat that as an _actual_ assignment,<br>
>> you probably have enough of those already :) ).<br>
>><br>
>> So, this got very long, sorry for that, I hope it helps. Please don't hesitate to reach me for questions.<br>
>><br>
>> Best,<br>
>> Stefanos<br>
>><br>
>> Στις Τρί, 15 Δεκ 2020 στις 9:12 μ.μ., ο/η amit kumar via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> έγραψε:<br>
>>><br>
>>> Respected Sir/Ma'am,<br>
>>> I'm Amit Kumar, a 3rd-year undergraduate<br>
>>> student in Computer Science Engineering (CSE) from IIIT Nagpur, India.<br>
>>> I am new to open source only contributed to HactoberFest in the past 2<br>
>>> years and I came across LLVM through GSoC and interested in<br>
>>> building some new features in the newer version's LLVM and contribute<br>
>>> to the language. I had studied Compiler Design in our courses.<br>
>>><br>
>>> Please help me and show me direction towards starting my journey to<br>
>>> the open-source contribution.<br>
>>> Thanks and Regards<br>
>>> Amit Kumar<br>
>>> _______________________________________________<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>
>><br>
>> _______________________________________________<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>
_______________________________________________<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>