mirror of
https://github.com/RPCS3/llvm.git
synced 2025-01-12 15:30:56 +00:00
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:
parent
ca0a4778a8
commit
4c225baa3e
@ -17,6 +17,7 @@
|
|||||||
#define LLVM_TARGET_MREGISTERINFO_H
|
#define LLVM_TARGET_MREGISTERINFO_H
|
||||||
|
|
||||||
#include "llvm/CodeGen/MachineBasicBlock.h"
|
#include "llvm/CodeGen/MachineBasicBlock.h"
|
||||||
|
#include "llvm/Codegen/ValueTypes.h"
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <functional>
|
#include <functional>
|
||||||
|
|
||||||
@ -44,13 +45,18 @@ public:
|
|||||||
typedef const unsigned* const_iterator;
|
typedef const unsigned* const_iterator;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
MVT::ValueType VT;
|
||||||
const unsigned RegSize, Alignment; // Size & Alignment of register in bytes
|
const unsigned RegSize, Alignment; // Size & Alignment of register in bytes
|
||||||
const iterator RegsBegin, RegsEnd;
|
const iterator RegsBegin, RegsEnd;
|
||||||
public:
|
public:
|
||||||
TargetRegisterClass(unsigned RS, unsigned Al, iterator RB, iterator RE)
|
TargetRegisterClass(MVT::ValueType vt, unsigned RS, unsigned Al, iterator RB, iterator RE)
|
||||||
: RegSize(RS), Alignment(Al), RegsBegin(RB), RegsEnd(RE) {}
|
: VT(vt), RegSize(RS), Alignment(Al), RegsBegin(RB), RegsEnd(RE) {}
|
||||||
virtual ~TargetRegisterClass() {} // Allow subclasses
|
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.
|
// begin/end - Return all of the registers in this class.
|
||||||
iterator begin() const { return RegsBegin; }
|
iterator begin() const { return RegsBegin; }
|
||||||
iterator end() const { return RegsEnd; }
|
iterator end() const { return RegsEnd; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user