Llama$.$lisp is a compiler framework intended to target offload processor backends such as GPUs, using intermediate representation languages (IRs) that are device-agnostic. The Llama$.$lisp IRs are formulated as S-expressions. This makes them easy to generate using higher level programming languages, which is one of the primary goals for Llama$.$lisp. The highest IR layer currently implemented in Llama$.$lisp is C-Lisp. In this paper, we describe the macro system developed for the Llama$.$lisp compiler framework. We show how we implemented FFI bindings as an example of this system.
翻译:Llama$.$lisp是一个旨在面向GPU等卸载处理器后端的编译器框架,其采用与设备无关的中间表示语言。Llama$.$lisp的中间表示以S表达式形式构建,这使得通过高级编程语言生成这些表示变得简便,这也是Llama$.$lisp的主要设计目标之一。当前在Llama$.$lisp中实现的最高层中间表示为C-Lisp。本文阐述了为Llama$.$lisp编译器框架开发的宏系统,并以实现外部函数接口绑定为例展示了该系统的应用。