Use of JIT compiler infrastructure at Apple and CERN

Europe/Zurich
13/2-005 (CERN)

13/2-005

CERN

90
Show room on map
Description

Public get-together of Apple and CERN compiler engineers to discuss cutting-edge developments in just-in-time compilation (JIT), challenges, and future prospects.

Zoom Meeting ID
61194154283
Host
Jonas Rembser
Passcode
20596019
Useful links
Join via phone
Zoom URL
    • 16:00 16:45
      JIT-loading Arbitrary Programs 45m

      LLVM's ORC JIT APIs have traditionally been used in tools that are JIT-aware by design — LLDB, clang-repl, CppInterOp, and others. But what happens when you need to JIT-compile programs that were never intended to run under a JIT — full SwiftUI applications with thousands of files, mixed languages, static archives, and hardened runtime entitlements?

      This talk describes how LLVM's ORC JIT now powers Xcode Previews, enabling live previews of SwiftUI code by JIT-linking user projects on the fly. We cover the key technical challenges and solutions: an Override Plugin for fast function body replacement without relinking; custom memory management with code signing to preserve hardened runtime behavior; and a new dynamic loader integration via "pseudo-dylibs" that allows precompiled code to bind against JIT'd code.

      We also discuss performance work, including the redesign of ORC's WaitingOnGraph dependency tracking from an arbitrary directed graph into a bipartite structure with node coalescing, reducing pathological cases from over 500 seconds to around 2 seconds. Finally, we cover some of the many edge cases encountered in real-world projects, and look ahead to future opportunities for JIT-based developer workflows, new ORC runtime designs, and dynamic loader integration beyond Darwin.

      Lang Hames is an Apple Compiler Engineer, and maintainer of the LLVM JIT APIs.

      Speaker: Lang Hames (Apple)
    • 16:45 17:15
      Compiler as a Service: Interactive C++, language interoperability and beyond 30m

      Despite its high-performance capabilities, C++ is not the first programming language that comes to mind for rapidly developing robust applications, mainly due to the long edit-compile-run cycles. Ongoing research in our group aims to provide practical, interactive capabilities for C++, enabling dynamic interoperability, rapid prototyping, and exploratory programming, essential for data science and other applications. This talk explores how interactive C++ can be leveraged for various scientific use cases and teaching.
      This talk covers CppInterOp, a production-grade C++ interoperability library based on LLVM and Clang that provides compiler-as-a-service capabilities for seamless cross-language integration. CppInterOp formalizes a stable, backward-compatible API that enables dynamic languages to harness the full power of modern C++ without sacrificing expressiveness or performance. We explore applications of the CppInterOp library in the context of Python/C++ bindings, interactive C++ notebooks with xeus-cpp, and WebAssembly.

      Speakers: Vassil Vasilev (Princeton University (US)), Vipul Nellamakada (Ramaiah University of Applied Sciences (IN))
    • 17:15 17:45
      Discussion on ROOT build system: modules, C stdlib and C++ stdlib dependencies, Python, packaging 30m

      ROOT is an example of a framework that relies heavily on C++ JIT mixed with compiled libraries, which implies various portability challenges that have to be solved for a smoother ROOT installation experience with package managers like Pythons package index.

      This slot is dedicated to a focus discussion around these challenges.

      Speaker: Dr Vincenzo Eduardo Padulano (CERN)
    • 17:45 18:00
      Discussion 15m

      Contingency slot for any further discussion.