May 2015
Intermediate to advanced
296 pages
5h 10m
English
The target architecture can be described in terms of the registers present, the instruction set, and so on. Describing each of them manually is a tedious task. TableGen is a tool for backend developers that describes their target machine with a declarative language—*.td. The *.td files will be converted to enums, DAG-pattern matching functions, instruction encoding/decoding functions, and so on, which can then be used in other C++ files for coding.
To define registers and the register set in the target description's .td files, tablegen will convert the intended .td file into .inc files, which will be #include syntax in our .cpp files referring to the registers.
Let's assume that the sample target machine ...
Read now
Unlock full access