26class MCRegAliasIteratorImpl {
53 assert(
SI.isValid() &&
"Cannot dereference an invalid iterator.");
76 MCRegAliasIteratorImpl &operator++() {
80 while (
isValid() && *SI == Reg);
87 auto &Aliases = RegAliasesCache[
R.id()];
91 for (MCRegAliasIteratorImpl It(R,
this); It.isValid(); ++It)
92 Aliases.push_back(*It);
95 Aliases.erase(
unique(Aliases), Aliases.end());
97 "MCRegAliasIteratorImpl includes Self!");
102 Aliases.push_back(
R.id());
103 Aliases.shrink_to_fit();
118 "This is not a subregister index");
146 unsigned Size = isEH ? EHL2DwarfRegsSize : L2DwarfRegsSize;
152 if (
I == M+
Size ||
I->FromReg != RegNum)
158 return int64_t(
int(
I->ToReg));
164 unsigned Size = isEH ? EHDwarf2LRegsSize : Dwarf2LRegsSize;
170 if (
I != M +
Size &&
I->FromReg == RegNum)
184 if (std::optional<MCRegister> LRegNum =
getLLVMRegNum(RegNum,
true)) {
186 if (DwarfRegNum == -1)
196 if (
I == L2SEHRegs.end())
return (
int)RegNum;
201 if (L2CVRegs.empty())
204 if (
I == L2CVRegs.end())
220 }
while (*IA < *IB ? ++IA != EA : ++IB != EB);
Returns the sub type a function will return at a given Idx Should correspond to the result type of an ExtractValue instruction executed with just that one unsigned Idx
This file defines the DenseMap class.
static bool isValid(const char C)
Returns true if C is a valid mangled character: <0-9a-zA-Z_>.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
bool isValid() const
Returns true if this iterator is not yet at the end.
MCRegUnitRootIterator enumerates the root registers of a register unit.
bool isValid() const
Check if the iterator is at the end of the list.
MCRegisterClass - Base class of TargetRegisterClass.
bool contains(MCRegister Reg) const
contains - Return true if the specified register is included in this register class.
MCRegisterInfo base class - We assume that the target defines a static array of MCRegisterDesc object...
unsigned getNumSubRegIndices() const
Return the number of sub-register indices understood by the target.
bool regsOverlap(MCRegister RegA, MCRegister RegB) const
Returns true if the two registers are equal or alias each other.
const MCRegisterDesc & get(MCRegister Reg) const
Provide a get method, equivalent to [], but more useful with a pointer to this object.
MCRegister getMatchingSuperReg(MCRegister Reg, unsigned SubIdx, const MCRegisterClass *RC) const
Return a super-register of the specified register Reg so its sub-register of index SubIdx is Reg.
int getCodeViewRegNum(MCRegister RegNum) const
Map a target register to an equivalent CodeView register number.
int64_t getDwarfRegNumFromDwarfEHRegNum(uint64_t RegNum) const
Map a target EH register number to an equivalent DWARF register number.
int getSEHRegNum(MCRegister RegNum) const
Map a target register to an equivalent SEH register number.
iterator_range< MCSuperRegIterator > superregs(MCRegister Reg) const
Return an iterator range over all super-registers of Reg, excluding Reg.
const char * getName(MCRegister RegNo) const
Return the human-readable symbolic target-specific name for the specified physical register.
virtual int64_t getDwarfRegNum(MCRegister RegNum, bool isEH) const
Map a target register to an equivalent dwarf register number.
bool isArtificialRegUnit(MCRegUnit Unit) const
Returns true when the given register unit is considered artificial.
iterator_range< MCSubRegIterator > subregs(MCRegister Reg) const
Return an iterator range over all sub-registers of Reg, excluding Reg.
unsigned getSubRegIndex(MCRegister RegNo, MCRegister SubRegNo) const
For a given register pair, return the sub-register index if the second register is a sub-register of ...
iterator_range< MCRegUnitIterator > regunits(MCRegister Reg) const
Returns an iterator range over all regunits for Reg.
bool isArtificial(MCRegister RegNo) const
Returns true if the given register is artificial, which means it represents a regunit that is not sep...
std::optional< MCRegister > getLLVMRegNum(uint64_t RegNum, bool isEH) const
Map a dwarf register back to a target register.
MCRegister getSubReg(MCRegister Reg, unsigned Idx) const
Returns the physical register number of sub-register "Index" for physical register RegNo.
unsigned getNumRegs() const
Return the number of registers this target has (useful for sizing arrays holding per register informa...
Wrapper class representing physical registers. Should be passed by value.
static MCRegister from(unsigned Val)
Check the provided unsigned value is a valid MCRegister.
MCSuperRegIterator enumerates all super-registers of Reg.
Twine - A lightweight data structure for efficiently representing the concatenation of temporary valu...
Reg
All possible values of the reg field in the ModR/M byte.
This is an optimization pass for GlobalISel generic memory operations.
APInt operator*(APInt a, uint64_t RHS)
auto unique(Range &&R, Predicate P)
void sort(IteratorTy Start, IteratorTy End)
bool none_of(R &&Range, UnaryPredicate P)
Provide wrappers to std::none_of which take ranges instead of having to pass begin/end explicitly.
void report_fatal_error(Error Err, bool gen_crash_diag=true)
Report a serious error, calling any installed error handler.
DwarfLLVMRegPair - Emitted by tablegen so Dwarf<->LLVM reg mappings can be performed with a binary se...