1 //===- RegisterInfoEmitter.h - Generate a Register File Desc. ---*- C++ -*-===//
3 // This tablegen backend is responsible for emitting a description of a target
4 // register file for a code generator. It uses instances of the Register,
5 // RegisterAliases, and RegisterClass classes to gather this information.
7 //===----------------------------------------------------------------------===//
9 #ifndef REGISTER_INFO_EMITTER_H
10 #define REGISTER_INFO_EMITTER_H
12 #include "TableGenBackend.h"
14 class RegisterInfoEmitter : public TableGenBackend {
15 RecordKeeper &Records;
17 RegisterInfoEmitter(RecordKeeper &R) : Records(R) {}
19 // run - Output the register file description, returning true on failure.
20 void run(std::ostream &o);
22 // runHeader - Emit a header fragment for the register info emitter.
23 void runHeader(std::ostream &o);
25 // runEnums - Print out enum values for all of the registers.
26 void runEnums(std::ostream &o);