6 research outputs found

    Modernizing Parallel Code with Pattern Analysis

    Get PDF

    Survey on Combinatorial Register Allocation and Instruction Scheduling

    Full text link
    Register allocation (mapping variables to processor registers or memory) and instruction scheduling (reordering instructions to increase instruction-level parallelism) are essential tasks for generating efficient assembly code in a compiler. In the last three decades, combinatorial optimization has emerged as an alternative to traditional, heuristic algorithms for these two tasks. Combinatorial optimization approaches can deliver optimal solutions according to a model, can precisely capture trade-offs between conflicting decisions, and are more flexible at the expense of increased compilation time. This paper provides an exhaustive literature review and a classification of combinatorial optimization approaches to register allocation and instruction scheduling, with a focus on the techniques that are most applied in this context: integer programming, constraint programming, partitioned Boolean quadratic programming, and enumeration. Researchers in compilers and combinatorial optimization can benefit from identifying developments, trends, and challenges in the area; compiler practitioners may discern opportunities and grasp the potential benefit of applying combinatorial optimization

    Synthesizing Instruction Selection

    Get PDF
    Instruction selection is the part in a compiler that transforms IR code into machine code. Instruction selectors build on a library of hundreds if not thousands of rules. Creating and maintaining these rules is a tedious and error-prone manual process. In this paper, we present a fully automatic approach to create provably correct rule libraries from formal specifications of the instruction set architecture and the compiler IR using template-based counter-example guided synthesis (CEGIS). Thereby, we overcome several shortcomings of an existing SMT-based CEGIS approach, which was not applicable to our setting in the first place.We propose a novel way of handling memory operations and show how the search space can be iteratively explored to synthesize rules that are relevant for instruction selection. Our approach synthesized a large part of the integer arithmetic rules for the x86 architecture within a few days where existing techniques could not deliver a substantial rule library within weeks. With respect to the runtime of the compiled programs, we show that the synthesized rules are close to a manually-tuned instruction selector

    Інтерпретатор мови ChocoPy

    Get PDF
    Проєкт містить 88 с. тексту, 24 рисунки, 4 таблиці, посилання на 28 літературних джерел, 5 додатків та 4 конструкторські документи. Об’єктом розробки є мова програмування ChocoPy. Мета розробки – реалізація інтерпретатора мови програмування ChocoPy. У дипломному проєкті розглянуті теоретичні та практичні аспекти побудови компіляторів та інтерпретаторів. Було розроблено алгоритми лексичного, синтаксичного і семантичного аналізу. Інтерпретація вихідного коду відбувається шляхом обходу AST. Виконано кросплатформний портативний консольний додаток на технології Java у вигляді JAR–файлу. Програмне забезпечення може бути використано як основа для створення інтерпретаторів і компіляторів інших мов програмування.The project contains 88 pages of text, 24 figures, 4 tables, references to 28 literary sources, 5 annexes and 4 design documents. The object of development is the ChocoPy programming language. The purpose of the development – an implementation of the ChocoPy programming language interpreter. The graduation project considers the theoretical and practical aspects of building compilers and interpreters. Algorithms for lexical, syntactic, and semantic analysis were developed. A source code is interpreted by traversing an AST. A cross–platform portable console application based on Java technology in the form of a JAR file has been developed. The software can be used as a basis for creating interpreters and compilers for other programming languages
    corecore