The trend towards specialization of software and hardware - fuelled by the end of Moore's law and the still accelerating interest in domain-specific computing, such as machine learning - forces us to radically rethink our compiler designs. The era of a universal compiler framework built around a single one-size-fits-all intermediate representation (IR) is over. This realization has sparked the creation of the MLIR compiler framework that empowers compiler engineers to design and integrate IRs capturing specific abstractions. MLIR provides a generic framework for SSA-based IRs, but it doesn't help us to decide how we should design IRs that are easy to develop, to work with and to combine into working compilers.
To address the challenge of IR design, we advocate for a language-oriented compiler design that understands IRs as formal programming languages and enforces their correct use via an accompanying type system. We argue that programming language techniques directly guide extensible IR designs and provide a formal framework to reason about transforming between multiple IRs. In this paper, we discuss the design of the Shine compiler that compiles the high-level functional pattern-based data-parallel language RISE via a hybrid functional-imperative intermediate language to C, OpenCL, and OpenMP.
We compare our work directly with the closely related pattern-based Lift IR and compiler. We demonstrate that our language-oriented compiler design results in a more robust and predictable compiler that is extensible at various abstraction levels. Our experimental evaluation shows that this compiler design is able to generate high-performance GPU code.
A Constraint and Object Oriented Fifth Generation Programming Language and its Compiler and Runtime System
自LISP语言问世以来,第五代程序设计语言已经发展了几十年。然而,与第四代程序设计语言相比,第五代程序设计语言由于语义晦涩、问题表示严谨、推理能力有限等原因,一直没有得到广泛应用。为此,本文提出的第五代程序设计语言COOL(Constraint and Object Ordered Language)克服了以往第五代程序设计语言语义直观、处理问题条件限制严格等问题,提高了其推理能力。具体改进如下:第一,COOL支持面向过程和面向对象,便于在生产项目中应用;第二,COOL支持表达式作为函数声明和函数返回,提高了对数学公式的语言亲和力,支持将函数参数嵌入函数名字符串,使函数命名更接近自然语言。使数学问题更容易描述;第三,COOL引入了加权机制,通过累积加权加速推理过程。第四,COOL在编程中引入了正向和反向函数的概念,这样计算机就可以推断和执行具有逻辑顺序约束的问题。第五,计算机可以通过回溯算法和动态规划算法,利用正解过程推导出逆解过程,从而使计算机能够推导出具有时序约束的问题。第六,引入预执行步骤,将程序的推理和函数查询过程与执行过程分离,提高程序的执行速度。
No Saved Kaleidosope: an 100% Jitted Neural Network Coding Language with Pythonic Syntax
Federal University of Technology - Paraná(巴拉那联邦技术大学);Federal University of Goias(戈亚斯联邦大学);São Paulo State University(圣保罗州立大学);Federal University of Mato Grosso(马托格罗索联邦大学)
Rule-based High-level Hardware-RTL Synthesis of Algorithms, Virtualizing Machines, and Communication Protocols with FPGAs based on Concurrent Communicating Sequential Processes and the ConPro Synthesis Framework