Chris Lattner | 8dab6ca | 2004-08-16 01:09:52 +0000 | [diff] [blame] | 1 | //===- CodeGenRegisters.h - Register and RegisterClass Info -----*- C++ -*-===// |
Misha Brukman | 3da94ae | 2005-04-22 00:00:37 +0000 | [diff] [blame^] | 2 | // |
Chris Lattner | 8dab6ca | 2004-08-16 01:09:52 +0000 | [diff] [blame] | 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. |
Misha Brukman | 3da94ae | 2005-04-22 00:00:37 +0000 | [diff] [blame^] | 7 | // |
Chris Lattner | 8dab6ca | 2004-08-16 01:09:52 +0000 | [diff] [blame] | 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> |
Chris Lattner | 056afef | 2004-08-21 04:05:00 +0000 | [diff] [blame] | 19 | #include <vector> |
Chris Lattner | 8dab6ca | 2004-08-16 01:09:52 +0000 | [diff] [blame] | 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; |
Chris Lattner | 7a680c6 | 2004-08-21 02:24:57 +0000 | [diff] [blame] | 28 | unsigned DeclaredSpillSize, DeclaredSpillAlignment; |
Chris Lattner | 7a680c6 | 2004-08-21 02:24:57 +0000 | [diff] [blame] | 29 | CodeGenRegister(Record *R); |
Chris Lattner | 8dab6ca | 2004-08-16 01:09:52 +0000 | [diff] [blame] | 30 | }; |
| 31 | |
| 32 | |
| 33 | struct CodeGenRegisterClass { |
Chris Lattner | 056afef | 2004-08-21 04:05:00 +0000 | [diff] [blame] | 34 | Record *TheDef; |
| 35 | std::vector<Record*> Elements; |
| 36 | unsigned SpillSize; |
| 37 | unsigned SpillAlignment; |
Chris Lattner | 5767775 | 2004-08-21 19:21:21 +0000 | [diff] [blame] | 38 | std::string MethodDefinitions; |
Chris Lattner | 8dab6ca | 2004-08-16 01:09:52 +0000 | [diff] [blame] | 39 | |
Chris Lattner | 056afef | 2004-08-21 04:05:00 +0000 | [diff] [blame] | 40 | const std::string &getName() const; |
| 41 | |
| 42 | CodeGenRegisterClass(Record *R); |
Chris Lattner | 8dab6ca | 2004-08-16 01:09:52 +0000 | [diff] [blame] | 43 | }; |
| 44 | } |
| 45 | |
| 46 | #endif |