1 //===- CodeGenWrappers.h - Code Generation Class Wrappers -------*- C++ -*-===//
3 // These classes wrap target description classes used by the various code
4 // generation TableGen backends. This makes it easier to access the data and
5 // provides a single place that needs to check it for validity. All of these
6 // classes throw exceptions on error conditions.
8 //===----------------------------------------------------------------------===//
10 #ifndef CODEGENWRAPPERS_H
11 #define CODEGENWRAPPERS_H
13 #include "llvm/CodeGen/ValueTypes.h"
20 /// getValueType - Return the MVT::ValueType that the specified TableGen record
22 MVT::ValueType getValueType(Record *Rec);
24 std::ostream &operator<<(std::ostream &OS, MVT::ValueType T);
25 std::string getName(MVT::ValueType T);
26 std::string getEnumName(MVT::ValueType T);
29 /// CodeGenTarget - This class corresponds to the Target class in the .td files.
33 std::vector<Record*> CalleeSavedRegisters;
34 MVT::ValueType PointerType;
39 Record *getTargetRecord() const { return TargetRec; }
40 const std::string &getName() const;
42 const std::vector<Record*> &getCalleeSavedRegisters() const {
43 return CalleeSavedRegisters;
46 MVT::ValueType getPointerType() const { return PointerType; }
48 // getInstructionSet - Return the InstructionSet object...
49 Record *getInstructionSet() const;
51 // getInstructionSet - Return the CodeGenInstructionSet object for this
52 // target, lazily reading it from the record keeper as needed.
53 // CodeGenInstructionSet *getInstructionSet -