Expose the actual valuetype of each register class

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23583 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Chris Lattner 2005-10-02 06:23:19 +00:00
parent ca0a4778a8
commit 4c225baa3e

View File

@ -17,6 +17,7 @@
#define LLVM_TARGET_MREGISTERINFO_H
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/Codegen/ValueTypes.h"
#include <cassert>
#include <functional>
@ -44,13 +45,18 @@ public:
typedef const unsigned* const_iterator;
private:
MVT::ValueType VT;
const unsigned RegSize, Alignment; // Size & Alignment of register in bytes
const iterator RegsBegin, RegsEnd;
public:
TargetRegisterClass(unsigned RS, unsigned Al, iterator RB, iterator RE)
: RegSize(RS), Alignment(Al), RegsBegin(RB), RegsEnd(RE) {}
TargetRegisterClass(MVT::ValueType vt, unsigned RS, unsigned Al, iterator RB, iterator RE)
: VT(vt), RegSize(RS), Alignment(Al), RegsBegin(RB), RegsEnd(RE) {}
virtual ~TargetRegisterClass() {} // Allow subclasses
/// getType - Return the declared value type for this register class.
///
MVT::ValueType getType() const { return VT; }
// begin/end - Return all of the registers in this class.
iterator begin() const { return RegsBegin; }
iterator end() const { return RegsEnd; }