24 const char *
const BankPrefixes[NumBanks] = {
25 "%p",
"%b",
"%h",
"%w",
"%d",
"%q",
"%v2b",
"%v2h",
"%v2w",
26 "%v2d",
"%v3b",
"%v3h",
"%v3w",
"%v3d",
"%v4b",
"%v4h",
"%v4w",
"%v4d",
27 "%v5w",
"%v6w",
"%v7w",
"%v8w",
"%v16w",
"%v32w",
"%v64w"};
29 size_t Index =
static_cast<size_t>(Bank);
30 assert(Index < NumBanks &&
"Unknown register bank!");
32 return BankPrefixes[Index];
137 "need to update encoding");
156 unsigned RegBank =
static_cast<unsigned>(Bank);
158 "Register index exceeds virtual register encoding limit");
163std::pair<const char *, unsigned>
167 unsigned Num = Reg & ((1U <<
NumRegBits) - 1);
168 return {Prefix, Num};
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static constexpr unsigned NumTypeBits
static constexpr unsigned NumBankBits
static constexpr unsigned NumRegBits
This file declares encoding of PISA virtual registers.
MCRegisterClass - Base class of TargetRegisterClass.
const uint8_t TSFlags
Configurable target specific flags.
Wrapper class representing physical registers and target specific virtual registers.
static bool isVirtualRegNo(unsigned RegNo)
static RegBank getRegBank(unsigned NumElts, unsigned EltSize)
static unsigned encodeVirtualRegisterIndex(unsigned Idx, RegBank Bank, RegType Type)
static const char * getPrefixFromBank(RegBank Bank)
static RegEncoder::RegType getRegType(uint8_t EncodedBits)
static std::pair< const char *, unsigned > decodeVirtualRegister(MCRegister Reg)
The instances of the Type class are immutable: once they are created, they are never changed.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
This is an optimization pass for GlobalISel generic memory operations.