Difference between revisions of "NaplesPU LLVM Documentation"

From NaplesPU Documentation
Jump to: navigation, search
(Tablegen files)
Line 8: Line 8:
 
== Tablegen files ==
 
== Tablegen files ==
  
The ''Tablegen files'' are the starting point of a new LLVM backend. These files describe the target architecture through the Tablegen description language.
+
These files describe, through the [Tablegen |http://llvm.org/docs/TableGen/index.html] description language, the target architecture like the register file, the instruction set and the calling conventions.
  
 
== C++ classes implementation ==
 
== C++ classes implementation ==

Revision as of 14:15, 27 September 2017

To fully understand some aspects of some solutions adopted in the nu+ backend, it is highly recommended to read about the general aspects of compiler structure and the LLVM architecture. In particular, a newbie must be aware of Basic Blocks, SSA (Static Single Assignment) form, AST (Abstract Syntax tree) and DAG Direct Acyclic Graph. Further informations can be retrieved from the dragonbook.

Other than the general aspects about compilers, it is recommended to read about the LLVM architecture, the LLVM Intermediate Representation and Tablegen. See the following textbook for other informations [http://books.tarsoit.com/Getting%20Started%20with%20LLVM%20Core%20Libraries.pdf Getting Started with LLVM Core Libraries] and LLVM Cookbook.

The nu+ backend is contained in the NuPlus folder under "compiler/lib/Target" directory. It contains several files each of which implements a specific class of the LLVM Framework, some of which are tablegen files while others are C++ classes.

Tablegen files

These files describe, through the [Tablegen |http://llvm.org/docs/TableGen/index.html] description language, the target architecture like the register file, the instruction set and the calling conventions.

C++ classes implementation