1 //===- InstrInfoEmitter.h - Generate a Instruction Set Desc. ----*- C++ -*-===//
3 // This tablegen backend is responsible for emitting a description of the target
4 // instruction set for the code generator.
6 //===----------------------------------------------------------------------===//
8 #ifndef INSTRINFO_EMITTER_H
9 #define INSTRINFO_EMITTER_H
17 class InstrInfoEmitter {
18 RecordKeeper &Records;
20 InstrInfoEmitter(RecordKeeper &R) : Records(R) {}
22 // run - Output the instruction set description, returning true on failure.
23 void run(std::ostream &OS);
25 // runEnums - Print out enum values for all of the instructions.
26 void runEnums(std::ostream &OS);
28 void emitRecord(Record *R, unsigned Num, Record *InstrInfo, std::ostream &OS);
29 void emitShiftedValue(Record *R, StringInit *Val, IntInit *Shift,