Split register class "Methods" into MethodProtos and MethodBodies
[oota-llvm.git] / utils / TableGen / CodeGenRegisters.h
1 //===- CodeGenRegisters.h - Register and RegisterClass Info -----*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This file defines structures to encapsulate information gleaned from the
11 // target register and register class definitions.
12 //
13 //===----------------------------------------------------------------------===//
14
15 #ifndef CODEGEN_REGISTERS_H
16 #define CODEGEN_REGISTERS_H
17
18 #include <string>
19 #include <vector>
20
21 namespace llvm {
22   class Record;
23
24   /// CodeGenRegister - Represents a register definition.
25   struct CodeGenRegister {
26     Record *TheDef;
27     const std::string &getName() const;
28     unsigned DeclaredSpillSize, DeclaredSpillAlignment;
29     CodeGenRegister(Record *R);
30   };
31
32
33   struct CodeGenRegisterClass {
34     Record *TheDef;
35     std::string Namespace;
36     std::vector<Record*> Elements;
37     unsigned SpillSize;
38     unsigned SpillAlignment;
39     std::string MethodProtos, MethodBodies;
40
41     const std::string &getName() const;
42
43     CodeGenRegisterClass(Record *R);
44   };
45 }
46
47 #endif