The LLVM Compiler Infrastructure as been accepted again as a mentoring organisation for Google Summer of Code 2023 (GSoC). This is a great opportunity for students and other eligible people to gain substantial development experience with LLVM in a short period of time!

The application period for contributors is starting today and ends on 4 April 2023. Please find the full list of projects on llvm.org. In the following I want to provide more details on the projects I am mentoring and highlight a few others that caught my interest.

Out-of-process execution for clang-repl

clang-repl is an interactive C++ command line (REPL). It’s based on Clang and the ORC/JITLink infrastructure and it aims to implement to core functionality of CERN’s Cling in upstream LLVM.

Right now clang-repl can execute user code only its own process. This has a number of drawbacks and limits its applications. It’s the goal of this GSoC project to implement an out-of-process execution model in clang-repl. LLVM’s underlying ORC and JITLink libraries provide most of the basic functionality already. Now, we need to teach clang-repl to generate code that makes use of it and extend RPC features where necessary.

Applicants need a good understanding of C++ and basic assembly debugging skills. Experience with RPC and generation of LLVM IR code is a plus, but not strictly required.

Get in touch with us in the Discourse topic or in the #jit channel of the LLVM Discord server.

LLVM’s JITLink library links and loads static build artifacts for immediate execution. We can use clang to compile source code into an object file and execute it right away with the llvm-jitlink tool.

JITLink runs generic link steps and uses dedicated backends for target- and object-format-specific operations. This includes resolution of relocations, registration of exception handlers and preparation of thread-local storage. There is good support for a number of formats and platforms already, but we aren’t done yet. The goal of this GSoC project is to complete one of the existing implementations or add an entirely new one. In particular, we are thinking about AArch32 (skeleton is in review), BPF and PowerPC (both new).

Applicants need intermediate knowledge of both, C++ and target assembly. They will go through the target ABI documentation (like this for AArch32) and implement missing relocation types in their JITLink backend, populate GOT and PLT and add ORC Runtime support for advanced features.

Get in touch with us in the Discourse topic or in the #jit channel of the LLVM Discord server.

Patch based test coverage for quick test feedback

Regression tests are a fundamental part of any serious software engineering, but test suites keep growing and we rarely invest time to sort them out:

check-llvm-stats

Running all the tests gets increasingly time-consuming. It would be very useful if we could figure out what tests are actually affected by a given change in the code-base. In practice, this should be possible in many situations. The goal of this GSoC project is to extend LLVM’s llvm-lit test driver tool to record coverage information and feed them back in. (I guess in a first step limited to subsequent runs on the same system?) As mentioned by the mentor, applicants don’t need compiler experience, but knowledge in Python, data processing and diff processing. I assume experience with llvm-lit is a plus, but not strictly required.

Addressing Rust optimization failures

While the LLVM codegen backends and opimization pipelines aim to be language agnostic, they have been developed with a focus on C++ and it is not a surprise that they are not a perfect fit (yet) for IR code generated from other languages. Rust is a notable example here. The goal of this GSoC project is to find and mitigate missing optimization opportunities. Applicants will likely have a deep dive into the LLVM optimizer and learn a lot about the involved tooling. Prior knowlegde of C++, LLVM IR and Rust is required.

Improving compile times

One unfortunate drawback from the continuous growth of LLVM’s code-base is that compile-time is getting a few percent slower with every release. The goal of this GSoC project is to help mitigate that. Applicants will review profiling information to identify bottlenecks and try to improve the underlying code structures to reduce overhead. Prior knowledge of C++ and profiling tools will be necessary.