blob: 2cd312941b80aeaad0fceb31f76d4bd6fd16794a [file] [log] [blame]
Chris Lattner8dab6ca2004-08-16 01:09:52 +00001//===- CodeGenRegisters.h - Register and RegisterClass Info -----*- C++ -*-===//
Misha Brukman3da94ae2005-04-22 00:00:37 +00002//
Chris Lattner8dab6ca2004-08-16 01:09:52 +00003// 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.
Misha Brukman3da94ae2005-04-22 00:00:37 +00007//
Chris Lattner8dab6ca2004-08-16 01:09:52 +00008//===----------------------------------------------------------------------===//
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>
Chris Lattner056afef2004-08-21 04:05:00 +000019#include <vector>
Chris Lattner8dab6ca2004-08-16 01:09:52 +000020
21namespace llvm {
22 class Record;
23
24 /// CodeGenRegister - Represents a register definition.
25 struct CodeGenRegister {
26 Record *TheDef;
27 const std::string &getName() const;
Chris Lattner7a680c62004-08-21 02:24:57 +000028 unsigned DeclaredSpillSize, DeclaredSpillAlignment;
Chris Lattner7a680c62004-08-21 02:24:57 +000029 CodeGenRegister(Record *R);
Chris Lattner8dab6ca2004-08-16 01:09:52 +000030 };
31
32
33 struct CodeGenRegisterClass {
Chris Lattner056afef2004-08-21 04:05:00 +000034 Record *TheDef;
35 std::vector<Record*> Elements;
36 unsigned SpillSize;
37 unsigned SpillAlignment;
Chris Lattner57677752004-08-21 19:21:21 +000038 std::string MethodDefinitions;
Chris Lattner8dab6ca2004-08-16 01:09:52 +000039
Chris Lattner056afef2004-08-21 04:05:00 +000040 const std::string &getName() const;
41
42 CodeGenRegisterClass(Record *R);
Chris Lattner8dab6ca2004-08-16 01:09:52 +000043 };
44}
45
46#endif