2003-10-05 21:27:59 +02:00
|
|
|
//===- RegisterInfoEmitter.h - Generate a Register File Desc. ---*- C++ -*-===//
|
2005-04-22 02:00:37 +02:00
|
|
|
//
|
2003-10-20 22:20:30 +02:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
2007-12-29 21:37:13 +01:00
|
|
|
// This file is distributed under the University of Illinois Open Source
|
|
|
|
// License. See LICENSE.TXT for details.
|
2005-04-22 02:00:37 +02:00
|
|
|
//
|
2003-10-20 22:20:30 +02:00
|
|
|
//===----------------------------------------------------------------------===//
|
2003-10-05 21:27:59 +02:00
|
|
|
//
|
|
|
|
// This tablegen backend is responsible for emitting a description of a target
|
|
|
|
// register file for a code generator. It uses instances of the Register,
|
|
|
|
// RegisterAliases, and RegisterClass classes to gather this information.
|
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef REGISTER_INFO_EMITTER_H
|
|
|
|
#define REGISTER_INFO_EMITTER_H
|
|
|
|
|
|
|
|
#include "TableGenBackend.h"
|
|
|
|
|
2003-11-11 23:41:34 +01:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-10-05 21:27:59 +02:00
|
|
|
class RegisterInfoEmitter : public TableGenBackend {
|
|
|
|
RecordKeeper &Records;
|
|
|
|
public:
|
|
|
|
RegisterInfoEmitter(RecordKeeper &R) : Records(R) {}
|
2005-04-22 02:00:37 +02:00
|
|
|
|
2003-10-05 21:27:59 +02:00
|
|
|
// run - Output the register file description, returning true on failure.
|
2009-07-03 02:10:29 +02:00
|
|
|
void run(raw_ostream &o);
|
2003-10-05 21:27:59 +02:00
|
|
|
|
|
|
|
// runHeader - Emit a header fragment for the register info emitter.
|
2009-07-03 02:10:29 +02:00
|
|
|
void runHeader(raw_ostream &o);
|
2003-10-05 21:27:59 +02:00
|
|
|
|
|
|
|
// runEnums - Print out enum values for all of the registers.
|
2009-07-03 02:10:29 +02:00
|
|
|
void runEnums(raw_ostream &o);
|
2003-10-05 21:27:59 +02:00
|
|
|
};
|
|
|
|
|
2003-11-11 23:41:34 +01:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2003-10-05 21:27:59 +02:00
|
|
|
#endif
|