2003-08-01 04:38:38 +00:00
|
|
|
//===- RegisterInfoEmitter.h - Generate a Register File Desc. ---*- C++ -*-===//
|
2005-04-22 00:00:37 +00:00
|
|
|
//
|
2003-10-20 20:20:30 +00:00
|
|
|
// The LLVM Compiler Infrastructure
|
|
|
|
//
|
|
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
2005-04-22 00:00:37 +00:00
|
|
|
//
|
2003-10-20 20:20:30 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2003-08-01 04:38:38 +00: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
|
|
|
|
|
2003-08-06 04:36:35 +00:00
|
|
|
#include "TableGenBackend.h"
|
2003-08-01 04:38:38 +00:00
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
namespace llvm {
|
|
|
|
|
2003-08-06 04:36:35 +00:00
|
|
|
class RegisterInfoEmitter : public TableGenBackend {
|
2003-08-01 04:38:38 +00:00
|
|
|
RecordKeeper &Records;
|
|
|
|
public:
|
|
|
|
RegisterInfoEmitter(RecordKeeper &R) : Records(R) {}
|
2005-04-22 00:00:37 +00:00
|
|
|
|
2003-08-01 04:38:38 +00:00
|
|
|
// run - Output the register file description, returning true on failure.
|
|
|
|
void run(std::ostream &o);
|
|
|
|
|
|
|
|
// runHeader - Emit a header fragment for the register info emitter.
|
|
|
|
void runHeader(std::ostream &o);
|
2003-08-01 05:59:20 +00:00
|
|
|
|
|
|
|
// runEnums - Print out enum values for all of the registers.
|
|
|
|
void runEnums(std::ostream &o);
|
2003-08-01 04:38:38 +00:00
|
|
|
};
|
|
|
|
|
2003-11-11 22:41:34 +00:00
|
|
|
} // End llvm namespace
|
|
|
|
|
2003-08-01 04:38:38 +00:00
|
|
|
#endif
|