13#ifndef LLVM_LIB_TARGET_MIPS_MIPSREGISTERBANKINFO_H
14#define LLVM_LIB_TARGET_MIPS_MIPSREGISTERBANKINFO_H
18#define GET_REGBANK_DECLARATIONS
19#include "MipsGenRegisterBank.inc"
23class TargetRegisterInfo;
26#define GET_TARGET_REGBANK_CLASS
27#include "MipsGenRegisterBank.inc"
73 AmbiguousWithMergeOrUnmerge
76 bool isAmbiguous_64(InstType InstTy,
unsigned OpSize)
const {
77 if (InstTy == InstType::Ambiguous && OpSize == 64)
82 bool isAmbiguous_32(InstType InstTy,
unsigned OpSize)
const {
83 if (InstTy == InstType::Ambiguous && OpSize == 32)
88 bool isAmbiguous_32or64(InstType InstTy,
unsigned OpSize)
const {
89 if (InstTy == InstType::Ambiguous && (OpSize == 32 || OpSize == 64))
94 bool isAmbiguousWithMergeOrUnmerge_64(InstType InstTy,
95 unsigned OpSize)
const {
96 if (InstTy == InstType::AmbiguousWithMergeOrUnmerge && OpSize == 64)
101 bool isFloatingPoint_32or64(InstType InstTy,
unsigned OpSize)
const {
102 if (InstTy == InstType::FloatingPoint && (OpSize == 32 || OpSize == 64))
107 bool isFloatingPoint_64(InstType InstTy,
unsigned OpSize)
const {
108 if (InstTy == InstType::FloatingPoint && OpSize == 64)
113 bool isInteger_32(InstType InstTy,
unsigned OpSize)
const {
114 if (InstTy == InstType::Integer && OpSize == 32)
125 class AmbiguousRegDefUseContainer {
152 class TypeInfoForMF {
164 InstType &AmbiguousTy);
169 bool isDefUse, InstType &AmbiguousTy);
183 Types.try_emplace(
MI, InstType::NotDetermined);
192 const InstType &getRecordedTypeForInstr(
const MachineInstr *
MI)
const {
193 assert(wasVisited(
MI) &&
"Instruction was not visited!");
194 return Types.find(
MI)->getSecond();
198 void changeRecordedTypeForInstr(
const MachineInstr *
MI, InstType InstTy) {
199 assert(wasVisited(
MI) &&
"Instruction was not visited!");
200 Types.find(
MI)->getSecond() = InstTy;
206 assert(WaitingQueues.
count(
MI) &&
"Instruction was not visited!");
207 return WaitingQueues.
find(
MI)->getSecond();
213 assert(WaitingQueues.
count(
MI) &&
"Instruction was not visited!");
214 WaitingQueues.
find(
MI)->getSecond().push_back(WaitingForMI);
unsigned const MachineRegisterInfo * MRI
unsigned const TargetRegisterInfo * TRI
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
This class represents an Operation in the Expression.
iterator find(const_arg_type_t< KeyT > Val)
std::pair< iterator, bool > try_emplace(KeyT &&Key, Ts &&... Args)
bool erase(const KeyT &Val)
size_type count(const_arg_type_t< KeyT > Val) const
Return 1 if the specified key is in the map, 0 otherwise.
Helper class to build MachineInstr.
Representation of each machine instruction.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
This class provides the information for the target register banks.
void applyMappingImpl(MachineIRBuilder &Builder, const OperandsMapper &OpdMapper) const override
Here we have to narrowScalar s64 operands to s32, combine away G_MERGE or G_UNMERGE and erase instruc...
void setRegBank(MachineInstr &MI, MachineRegisterInfo &MRI) const
RegBankSelect determined that s64 operand is better to be split into two s32 operands in gprb.
const InstructionMapping & getInstrMapping(const MachineInstr &MI) const override
Get the mapping of the different operands of MI on the register bank.
const RegisterBank & getRegBankFromRegClass(const TargetRegisterClass &RC, LLT) const override
Get a register bank that covers RC.
Helper class that represents how the value of an instruction may be mapped and what is the related co...
Helper class used to get/create the virtual registers that will be used to replace the MachineOperand...
Holds all the information related to register banks.
This class implements the register bank concept.
Wrapper class representing virtual and physical registers.
This class consists of common code factored out of the SmallVector class to reduce code duplication b...
This is a 'vector' (really, a variable-sized array), optimized for the case when the array is small.
StringRef - Represent a constant reference to a string, i.e.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
This is an optimization pass for GlobalISel generic memory operations.