23void RegManager::computeMapping() {
24 std::array<unsigned, RegType::NUM_TYPE>
Count{};
25 const PISAInstrInfo *
TII = MF.getSubtarget<PISASubtarget>().getInstrInfo();
26 for (
const MachineBasicBlock &
MBB : MF) {
27 for (
const MachineInstr &
MI :
MBB) {
28 for (
const MachineOperand &MO :
MI.operands()) {
29 if (!MO.isReg() || (!MO.isDef() && !MO.isUndef()))
37 if (Mapping.count(CurReg) != 0)
41 if (
TII->isNoEmissionInstr(
MI))
46 Mapping[CurReg] =
Info;
54 assert(
I != Mapping.end() &&
"missing?");
67 : MF(MF), MRI(MF.getRegInfo()) {
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
const AArch64InstrInfo & TII
Promote Memory to Register
This file declares instruction information for the PISA target.
This file declares management of PISA virtual registers.
This file declares the PISA subtarget.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
typename SmallVector< std::pair< Register, RegInfo >, 0 >::const_iterator const_iterator
static unsigned encodeVirtualRegisterIndex(unsigned Idx, RegBank Bank, RegType Type)
static RegEncoder::RegType getRegType(uint8_t EncodedBits)
unsigned getRegIdx(Register Reg) const
RegManager(const MachineFunction &MF)
unsigned encodeVirtualRegister(RegBank Bank, Register Reg) const
Wrapper class representing virtual and physical registers.
static Register index2VirtReg(unsigned Index)
Convert a 0-based index to a virtual register number.
constexpr bool isPhysical() const
Return true if the specified register number is in the physical register namespace.
The instances of the Type class are immutable: once they are created, they are never changed.
This is an optimization pass for GlobalISel generic memory operations.
RelativeUniformCounterPtr ValuesPtrExpr VTableAddr Count