[llvm-dev] How to contribute on LLVM project as beginner

Greg Bedwell via llvm-dev llvm-dev at lists.llvm.org
Wed Jul 24 03:41:57 PDT 2019


On Wed, 24 Jul 2019 at 10:52, Oliver Stannard via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Your script looks OK, though you won't want to use the -opt-bisect-limit=
> option until you've found a case where code-generation changes. Instead,
> that's a tool which you could use to narrow down the pass inside LLVM which
> is causing the change.
>
> The problem is that your input code is far too simple to trigger any
> interesting optimisations. I'd suggest starting with either some code from
> the LLVM test suite (https://github.com/llvm/llvm-test-suite), or some
> code generated by csmith (https://embed.cs.utah.edu/csmith/). The former
> has the advantage of being (mostly) real code people actually write, and
> the latter can generate a large amount of complex code without any external
> dependencies (so it's easy to build).
>
>
A few other things to note:

There's a tool in clang here (
https://github.com/llvm/llvm-project/tree/master/clang/utils/check_cfc )
called check_cfc which uses the same basic idea as the script above.  It's
designed to transparently wrap clang invocations so that any differences in
codegen will actually trigger a build failure.  There are a few more
details in these slides (
https://llvm.org/devmtg/2015-04/slides/Verifying_code_gen_dash_g_final.pdf ).
Ultimately it doesn't matter which tools you use in order to find bugs, but
you may find it useful.

We've got a meta-bug here to which we've been attaching already-reported
bugs in this area ( https://bugs.llvm.org/show_bug.cgi?id=37728 ) which
might be a nice place to start so that you can try replicating the
results.  In particular https://bugs.llvm.org/show_bug.cgi?id=42138 is a
bug that one of our interns found recently using the check_cfc script with
llvm test-suite (and then reducing with creduce).  Unfortunately it was
right at the end of his internship so he didn't get a chance to try and fix
it. It might be a good starting point to have a go at replicating the
failure and then trying to figure out what's happening and fixing it
(assuming that it's still present).  I'm sure that there are plenty of
people in the community willing to help out with any specific issues you
run into along the way.

Good luck, with whichever approach you take!

-Greg
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190724/1efa6881/attachment.html>


More information about the llvm-dev mailing list