<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="static/style.xsl"?><OAI-PMH xmlns="http://www.openarchives.org/OAI/2.0/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"><responseDate>2026-09-24T12:45:21Z</responseDate><request verb="GetRecord" identifier="oai:www.repository.cam.ac.uk:1810/340215" metadataPrefix="uketd_dc">https://api.repository.cam.ac.uk/server/oai/request</request><GetRecord><record><header><identifier>oai:www.repository.cam.ac.uk:1810/340215</identifier><datestamp>2023-12-22T12:56:39Z</datestamp><setSpec>com_1810_219481</setSpec><setSpec>com_1810_256065</setSpec><setSpec>col_1810_219482</setSpec></header><metadata><uketd_dc:uketddc xmlns:uketd_dc="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:uketdterms="http://naca.central.cranfield.ac.uk/ethos-oai/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:doc="http://www.lyncode.com/xoai" xsi:schemaLocation="http://naca.central.cranfield.ac.uk/ethos-oai/2.0/ http://naca.central.cranfield.ac.uk/ethos-oai/2.0/uketd_dc.xsd">
   <dc:title>Low-level cross-language post-link optimisation</dc:title>
   <dc:identifier xsi:type="dcterms:DOI">10.17863/CAM.87641</dc:identifier>
   <dc:creator>Licker, Nandor</dc:creator>
   <uketdterms:advisor>Jones, Timothy</uketdterms:advisor>
   <dcterms:abstract>A Foreign Function Interface (FFI) is a powerful tool that allows a method in
one language to invoke another method from a distinct language.
Unlike calls within the bounds of the same language, invocations through the
FFI crossing a language barrier incur a significant overhead, due to both
missed optimisation opportunities and the required glue code or trampolines.
Since the redundancies are exposed only at link time when the modules of the
participating languages are merged together to form the final program,
ameliorating the overhead of FFI calls falls within the scope of link-time
or post-link optimisers.
Presently, such optimisers lack the required specialised transformations to
fully exploit the optimisation opportunities exposed by the cross-language
context and rely on representations that are either more abstract than some
of the participating languages or unreasonably difficult to analyse as they
discard all relevant structure.

This thesis tackles the problem of cross-language optimisation by introducing
the Duplo framework and its associated analyses and transformations.
Duplo is built around the Low-Level Intermediate Representation (LLIR), capable
of representing both high-level and low-level languages, such as OCaml, Rust and
C.
The representation is generated through custom compiler backends and assembled
into modules carrying whole program information through a specialised toolchain,
before optimisations are applied and executable machine code is emitted.
Most importantly, LLIR enables inlining across FFI calls, creating opportunities
for other improvements.
In addition to applying a series of well-established inter-procedural
analyses and transformations adapted to the cross-language context, the
framework includes novel algorithms designed to operate specifically
on global representations, aimed at simplifying the startup path and extracting
type information compatible with all source languages for use in further
optimisation passes.

The Duplo framework and its associated cross-language and
inter-procedural optimisations yield substantial benefits in excess of
existing tools, improving both the code-size and performance.
Results are demonstrated on a diverse range of macro- and micro-benchmarks
testing widely used functionality, along with real-world applications.</dcterms:abstract>
   <uketdterms:institution>University of Cambridge</uketdterms:institution>
   <dcterms:issued>2021-12-17</dcterms:issued>
   <dc:type>Thesis</dc:type>
   <uketdterms:qualificationlevel>Doctoral</uketdterms:qualificationlevel>
   <uketdterms:qualificationname>Doctor of Philosophy (PhD)</uketdterms:qualificationname>
   <dc:language>eng</dc:language>
   <uketdterms:sponsor>Cambridge Trust Vice Chancellor's scholarship</uketdterms:sponsor>
   <dcterms:isReferencedBy xsi:type="dcterms:URI">https://www.repository.cam.ac.uk/handle/1810/340215</dcterms:isReferencedBy>
   <dc:identifier xsi:type="dcterms:URI">https://apollo8-f-pro.lib.cam.ac.uk/bitstreams/044df4bc-bdf0-4472-ad51-c5d6c2f541dc/download</dc:identifier>
   <uketdterms:checksum xsi:type="uketdterms:MD5">847d5620886f4a45b1bc3b25968603d7</uketdterms:checksum>
   <dc:rights>https://www.rioxx.net/licenses/all-rights-reserved/</dc:rights>
   <dc:subject>Compilers</dc:subject>
   <dc:subject>Post-Link Optimisation</dc:subject>
</uketd_dc:uketddc>
</metadata></record></GetRecord></OAI-PMH>