[llvm-dev] Want to contribute in LLVM.

Stephen Neuendorffer via llvm-dev llvm-dev at lists.llvm.org
Tue Dec 15 22:18:54 PST 2020


Another option would be to take some existing passes and reimplement them
in a useful way in MLIR.  Even some
 elatively simple passes (like mem2reg/reg2mem) could be useful in the MLIR
standard dialect, for instance,
but no one has taken the time to do the implementation.

Steve

On Tue, Dec 15, 2020 at 7:27 PM amit kumar via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Thank you so know to guide me towards my first step, I'm going through
> your suggested step and will let you know if I face any problem. and
> last but not least these kinds of quick help/replies really give
> motivation to beginners like me towards open-source contribution.
>
> Thanks and regards
> Amit Kumar
>
> On Wed, Dec 16, 2020 at 8:12 AM Armand Behroozi <armandb at umich.edu> wrote:
> >
> > Hey Amit,
> >
> > EECS583 at Umich also has a homework assignment or two that you could
> give a go if you wanted.
> > HW2 asks you to extend the loop invariant code motion pass and do
> frequent path LICM (hoist almost invariant code).
> >
> > Link below.
> > https://web.eecs.umich.edu/~mahlke/courses/583f18/homeworks.html
> >
> > It's just another resource.
> >
> > Best of luck.
> >
> > Regards,
> >
> > Armand
> >
> > On Tue, Dec 15, 2020 at 4:18 PM Stefanos Baziotis via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
> >>
> >> Hi Amit,
> >>
> >> There are the bugs tagged beginner but last time I checked, IMHO, they
> were not that "beginner-friendly" after all.
> >>
> >> 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.
> >> 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.
> >>
> >> But a common theme I see among beginners, including myself when I
> started, is that when you're obsessed with landing a commit,
> >> unavoidably you're going to "hack your way towards it". That basically
> means that you'll just gather relatively shallow knowledge, maybe
> >> 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.
> >>
> >> This is why for example, in courses which use LLVM as a teaching tool,
> the assignments don't ask you to do something
> >> shallow like that but instead they ask for something that requires some
> kind of deep knowledge and thought (which you develop along).
> >>
> >> To that end, I recommend rewriting a pass (which is btw somewhat common
> in courses). Now, that might sound scary but it's not.
> >> The _actual_ goal is not to actually rewrite the pass. Neither all of
> it, nor at the production level of LLVM. Rewriting
> >> the pass is just an "artificial goal" only to have something to move
> towards. The _actual_ goal is what you'll learn by moving
> >> towards this goal. And what you'll learn will probably be both deep and
> broad.
> >>
> >> 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
> >> 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
> >> same thing and you should feel free to copy code shamelessly as you're
> starting out).
> >>
> >> 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.
> >>
> >> 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.
> >> 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
> >> in inter-procedural optimizations, I'd start with Sparse Conditional
> Constant Propagation (SCCP).
> >>
> >> 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
> >> in a cool course on UIUC recently and it seems to guide you relatively
> well. Here's the link:
> http://misailo.web.engr.illinois.edu/courses/526-sp20/,
> >> 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,
> >> you probably have enough of those already :) ).
> >>
> >> So, this got very long, sorry for that, I hope it helps. Please don't
> hesitate to reach me for questions.
> >>
> >> Best,
> >> Stefanos
> >>
> >> Στις Τρί, 15 Δεκ 2020 στις 9:12 μ.μ., ο/η amit kumar via llvm-dev <
> llvm-dev at lists.llvm.org> έγραψε:
> >>>
> >>> Respected Sir/Ma'am,
> >>>                        I'm Amit Kumar, a 3rd-year undergraduate
> >>> student in Computer Science Engineering (CSE) from IIIT Nagpur, India.
> >>> I am new to open source only contributed to HactoberFest in the past 2
> >>> years and I came across LLVM through GSoC and interested in
> >>> building some new features in the newer version's LLVM and contribute
> >>> to the language. I had studied Compiler Design in our courses.
> >>>
> >>> Please help me and show me direction towards starting my journey to
> >>> the open-source contribution.
> >>> Thanks and Regards
> >>> Amit Kumar
> >>> _______________________________________________
> >>> LLVM Developers mailing list
> >>> llvm-dev at lists.llvm.org
> >>> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> >>
> >> _______________________________________________
> >> LLVM Developers mailing list
> >> llvm-dev at lists.llvm.org
> >> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20201215/3a4fd377/attachment-0001.html>


More information about the llvm-dev mailing list