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
|
|
|
|
//
|
2007-12-29 20:37:13 +00:00
|
|
|
// This file 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.
|
2009-07-03 00:10:29 +00:00
|
|
|
void run(raw_ostream &o);
|
2003-08-01 04:38:38 +00:00
|
|
|
|
|
|
|
// runHeader - Emit a header fragment for the register info emitter.
|
2009-07-03 00:10:29 +00:00
|
|
|
void runHeader(raw_ostream &o);
|
2003-08-01 05:59:20 +00:00
|
|
|
|
|
|
|
// runEnums - Print out enum values for all of the registers.
|
2009-07-03 00:10:29 +00:00
|
|
|
void runEnums(raw_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
|