Another program year is ending and our Compiler Researchteam is extremely happy to share the hard work and the results of our internscontributors!The Compiler Research team includes researchers located at Princeton Universityand CERN.Our primary goal is research into foundational software tools helping scientiststo program for speed, interoperability, interactivity, flexibility, andreproducibility. We work in various fields of science such as high energyphysics, where research is fundamentally connected to software at exabyte scale.We develop computational methods and research software for scientificexploration and discovery. Our current research focuses on three main topics:interpretative C/C++/CUDA, automatic differentiation tools, and C++ language interoperability with Pythonand D.This year, we had six participants who worked on seven projects, covering a widerange of topics, from LLVM’s new JIT linker(JITLink) toClang-Repl,an interactive C++ interpreter for incremental compilation integratedin Clang. All projects rise toward acommon, ambitious goal: to establish a proficient workflow in LLVM,where interactivedevelopment in C++ is possible, and exploratory C++ becomes an accessibleexperience to a wider audience.Below you can find the list of projects from our interns, an overview of theobjectives and results. We invite you to follow the links to access a moredetailed description of each project.JITLink support for a new format/architecture (ELF/AARCH64)Developer: Sunho Kim(Computer Science, De Anza College, Cupertino, California)Mentors: Stefan Gränitz (Freelance Compiler Developer, Berlin,Deutschland),Lang Hames (Apple), Vassil Vassilev (Princeton University/CERN)Funding: Google Summer of Code 2022Suhno developed a JITLinkspecialization that extends JITLink’s generic linker algorithm, allowingJITLink to support ELF/aarch64 target and provides full support of all advancedPE/COFF object file features. By supporting the ELF/aarch64 target, JITLink cannow be used in Julia, while COFF/X86_64 enables Microsoft Visual C++ (MSCV)target in Clang-Repl.Here you can find Sunho’s GSoCfinal report.Hurray! This project has been accepted as a Tutorial at the2022 LLVM Developers’ Meeting!The conference took place in San Jose, California, from 7th to 10th November2022.Here you can find thevideoand the slidesof Sunho’s presentation.The project was also presented at the Compiler As a Service (CaaS) monthlymeeting. Here you can find the videoand the slidesof Sunho’s presentation.Extend Clang to resugar template specialization accessesDeveloper: Matheus IzvekovMentors: Richard Smith (Google), Vassil Vassilev (PrincetonUniversity/CERN)Funding: Google Summer of Code 2022Clang’s type system was optimized bypushing type-syntactic-sugar on the arguments of a template specialization intothose member accesses. This was achieved by: 1. creating a new type node intothe Abstract Syntax Tree (AST) that represents the sugar of a member access ina template specialization; and 2. implementing single step desugaring logicwhich will perform the substitution of template parameter sugar into thecorresponding specialization argument sugar. As a result, we improved Clang’sdiagnostic system by enabling other constructs to preserve type sugar, allowingboth for their representation when present in the specialization argument.Here you can find Matheus’ GSoCfinal report.Hurray! This project has been accepted as a Lightning Talk at the2022 LLVM Developers’ Meeting!The conference took place in San Jose, California, from 7th to 10th November2022.Here you can find the videoand theslidesof Matheus’ presentation.Recovering from Errors in Clang-Repl and Code UndoDevelopers: Jun Zhang(Software Engineering, Anhui Normal University, WuHu, China) andPurva Chaudhari(California State University Northridge, Northridge CA, USA)Mentors: Vassil Vassilev (Princeton University/CERN)Clang-Repl is aninteractive C++ interpreter integrated in Clang, which enables incrementalcompilation. It supports interactive programming for C++ in aRead-Eval_Print Loop(REPL)style, compiling the code just-in-time with a JIT approach that reduces thecompile-run cycles. We added the “undo” functionality to Clang-REPL, and weimproved error-recovery by adding the possibility to recover the low-levelexecution infrastructure. As a result, Clang-REPL now supports reversalexecution and recovery actions on behalf of a user in an automatic andconvenient way.Hurray! This project has been accepted as a Lightning Talk at the2022 LLVM Developers’ Meeting!The conference took place in San Jose, California, from 7th to 10th November2022.Here you can find the videoand theslidesof Purva and Jun’s presentation.Shared Memory Based JITLink Memory ManagerDeveloper: Anubhab Ghosh(Computer Science and Engineering, Indian Institute of Information Technology, Kalyani, India)Mentors: Stefan Gränitz (Freelance Compiler Developer, Berlin, Deutschland),Lang Hames (Apple), Vassil Vassilev (Princeton University/CERN)Funding: Google Summer of Code 2022Anubhab introduced a new JITLinkMemoryManagerbased on a MemoryMapper abstraction that is capable of allocating JIT code(and data) using shared memory. The following advantages should arise from theimplemented strategy: 1. a faster transport (and access) for code and data whenrunning JIT’d code in a separate process on the same machine, and 2. theguarantee that all allocations are close together in memory and meet theconstraints of the default code model allowing the use of outputs from regularcompilers.Here you can find Anubhab’s GSoCfinal report.Hurray! This project has been accepted as a Lightning Talk at the2022 LLVM Developers’ Meeting!The conference took place in San Jose, California, from 7th to 10th November2022.Here you can find the videoand theslidesof Anubhab’s presentation.Optimize ROOT use of modules for large codebasesDeveloper: Jun Zhang(Software Engineering, Anhui Normal University, WuHu, China)Mentors: David Lange (Princeton University), Alexander Penev(University of Plovdiv Paisii Hilendarski, Bulgaria), Vassil Vassilev(Princeton University/CERN)Funding: Google Summer of Code 2022The current performance of the modules usage in ROOTwas evaluated, and a strategy for optimizing the memory footprint was developed.This strategy includes reducing unnecessary symbol-lookups and module-loading,and is especially useful for very large codebases like CMSSW,where Jun reduced the amount of memory by half (from 1.1GB to 600MB) for simpleworkflows like hsimple.C, and the number of loaded from 180 to 52.Here you can find Jun’s GSoCfinal report.Add Initial Integration of Clad with EnzymeDeveloper: Manish Kausik H(.Tech and M.Tech in Computer Science and Engineering(Dual Degree),Indian Institute of Technology Bhubaneswar)Mentors: David Lange (Princeton University), William Moses(Massachusetts Institute of Technology), Vassil Vassilev (Princeton University/CERN)Funding: Google Summer of Code 2022Clad is an opensource plugin to the Clang compiler that enables Automatic Differentiationfor C++. Clad receives an Abstract Syntax Tree (AST) from the underlyingcompiler platform (Clang), decides whether a derivative is requested andproduces it, and modifies the AST to insert the generated code.Enzyme AD is an LLVM based AD plugin.It works by taking existing code as LLVM IR and computing the derivative(and gradient) of that function.In this project, Manish integrated Enzyme within Clad, giving a Clad user theoption of selecting Enzyme for Automatic Differentiation on demand. Theintegration of Clad and Enzyme t results in a new tool that offers an optimizedand flexible implementation of automatic differentiation.Here you can find Manish’s GSoCfinal report.Thank you, developers!We hope our interns contributors enjoyed our community. Our best reward is toknow that we supported your early steps into the world of open-source softwaredevelopment and compiler construction. We hope that this experience motivatedyou to continue to be involved with the broad LLVM ecosystem.We express our gratitude to the Google Summer of CodeProgram and to the Institute for Research and Innovation in Software for HighEnergy Physics (IRIS-HEP) for supporting ourresearch and providing six young developers this wonderful opportunity.A special thanks goes to the LLVM community for being supportive and for sharingtheir knowledge and introducing our community to the new contributors. Thank youso much!Thanks for choosing Compiler-Research for your internship! We were lucky tohave you!