TableGen is a language used for defining records for different situations (e.g. targets, subtarget features, etc) in LLVM. The TableGen binary uses the given record definitions to produce a matcher table for a target. Each target has its own target-specific definition (e.g. X86.td).

  • An abstract record (or “class”) is a template for creating concrete records. Certain values are left blank to be defined in a concrete record.
  • A concrete record (or just “record”) is a definition of some sort. It can be a register (e.g. rax) or an instruction (e.g. add). All values in a concrete record are defined.
  • A multiclass is a group of abstract records. When they are instantiated, multiple concrete records can be defined simultaneously.