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"
70 AmbiguousWithMergeOrUnmerge
73 bool isAmbiguous_64(InstType InstTy,
unsigned OpSize)
const {
74 if (InstTy == InstType::Ambiguous && OpSize == 64)
79 bool isAmbiguous_32(InstType InstTy,
unsigned OpSize)
const {
80 if (InstTy == InstType::Ambiguous && OpSize == 32)
85 bool isAmbiguous_32or64(InstType InstTy,
unsigned OpSize)
const {
86 if (InstTy == InstType::Ambiguous && (OpSize == 32 || OpSize == 64))
91 bool isAmbiguousWithMergeOrUnmerge_64(InstType InstTy,
92 unsigned OpSize)
const {
93 if (InstTy == InstType::AmbiguousWithMergeOrUnmerge && OpSize == 64)
98 bool isFloatingPoint_32or64(InstType InstTy,
unsigned OpSize)
const {
99 if (InstTy == InstType::FloatingPoint && (OpSize == 32 || OpSize == 64))
104 bool isFloatingPoint_64(InstType InstTy,
unsigned OpSize)
const {
105 if (InstTy == InstType::FloatingPoint && OpSize == 64)
110 bool isInteger_32(InstType InstTy,
unsigned OpSize)
const {
111 if (InstTy == InstType::Integer && OpSize == 32)
122 class AmbiguousRegDefUseContainer {
149 class TypeInfoForMF {
161 InstType &AmbiguousTy);
166 bool isDefUse, InstType &AmbiguousTy);
180 Types.try_emplace(
MI, InstType::NotDetermined);
189 const InstType &getRecordedTypeForInstr(
const MachineInstr *
MI)
const {
190 assert(wasVisited(
MI) &&
"Instruction was not visited!");
191 return Types.find(
MI)->getSecond();
195 void changeRecordedTypeForInstr(
const MachineInstr *
MI, InstType InstTy) {
196 assert(wasVisited(
MI) &&
"Instruction was not visited!");
197 Types.find(
MI)->getSecond() = InstTy;
203 assert(WaitingQueues.
count(
MI) &&
"Instruction was not visited!");
204 return WaitingQueues.
find(
MI)->getSecond();
210 assert(WaitingQueues.
count(
MI) &&
"Instruction was not visited!");
211 WaitingQueues.
find(
MI)->getSecond().push_back(WaitingForMI);
unsigned const MachineRegisterInfo * MRI
unsigned const TargetRegisterInfo * TRI
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
void visit(MachineFunction &MF, MachineBasicBlock &Start, std::function< void(MachineBasicBlock *)> op)
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.
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.
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.