Designing Decoupled Compiler Transformation APIs

Graduate Thesis uoadl:2958380 317 Read counter

Unit:
Department of Informatics and Telecommunications
Πληροφορική
Deposit date:
2021-07-28
Year:
2021
Author:
BAZIOTIS STEFANOS
Supervisors info:
Γιάννης Σμαραγδάκης, Καθηγητής, Σχολή Πληροφορικής ΕΚΠΑ
Original Title:
Designing Decoupled Compiler Transformation APIs
Languages:
English
Greek
Translated title:
Designing Decoupled Compiler Transformation APIs
Summary:
The fundamental design of optimizing compilers has not changed for many decades. It
is oriented around passes, each of which tries to apply a specific transformation. A
celebrated benefit of this design is the separation of concerns, because each
pass is concerned with a single transformation. But what
is subtle is that it also hinders the separation of concerns.

In modern instances of this design,
each pass has at least two responsibilities: performing a transformation and
deciding whether the transformation is profitable. Inevitably, the code dealing with each of these responsibilities
is tightly coupled and one can't interface with or change each piece separately.

However, each of these responsibilities is radically different and the people
having the expertise to improve one do not necessarily have the knowledge
to even understand the other. For instance, profitability
could be picked up by a machine-learning researcher, who is interested in improving the
heuristics used but is not at all interested in learning how the compiler performs
the transformation.

In this thesis, we present a prototype of a transformation,
implemented over the LLVM framework, used to serve a broader goal; that of separating transformations in their own independent, granular APIs. Such APIs should offer high-control and minimal cognitive load to the user, whether this is a compiler expert or not.

The transformation we chose is loop distribution because it is easily comprehensible yet
potentially highly effective, while its implementation is comparable to LLVM's upstream version.
Main subject category:
Technology - Computer science
Keywords:
compilers, transformations, API, loop distribution, LLVM
Index:
Yes
Number of index pages:
3
Contains images:
Yes
Number of references:
8
Number of pages:
44
Decoupling_Compiler_Transformations v2.pdf (331 KB) Open in new window