20#define GET_TARGET_REGBANK_IMPL
22#include "WebAssemblyGenRegisterBank.inc"
66 unsigned Opc =
MI.getOpcode();
71 Opc == TargetOpcode::G_PHI) {
78 const unsigned NumOperands =
MI.getNumOperands();
82 const LLT Op0Ty = MRI.
getType(
MI.getOperand(0).getReg());
85 auto &Op0IntValueMapping =
95 OperandsMapping = &Op0IntValueMapping;
102 if (!OperandsMapping)
Register const TargetRegisterInfo * TRI
This file provides WebAssembly-specific target descriptions.
This file declares the targeting of the RegisterBankInfo class for WebAssembly.
This file contains the WebAssembly implementation of the WebAssemblyRegisterInfo class.
constexpr TypeSize getSizeInBits() const
Returns the total size of the type. Must only be called on sized types.
MachineRegisterInfo & getRegInfo()
getRegInfo - Return information about the registers currently in use.
Representation of each machine instruction.
MachineRegisterInfo - Keep track of information for virtual and physical registers,...
LLT getType(Register Reg) const
Get the low-level type of Reg or LLT{} if Reg is not a generic (target independent) virtual register.
Helper class that represents how the value of an instruction may be mapped and what is the related co...
bool isValid() const
Check whether this object is valid.
const InstructionMapping & getInstructionMapping(unsigned ID, unsigned Cost, const ValueMapping *OperandsMapping, unsigned NumOperands) const
Method to get a uniquely generated InstructionMapping.
const InstructionMapping & getInvalidInstructionMapping() const
Method to get a uniquely generated invalid InstructionMapping.
const ValueMapping * getOperandsMapping(Iterator Begin, Iterator End) const
Get the uniquely generated array of ValueMapping for the elements of between Begin and End.
static const unsigned DefaultMappingID
Identifier used when the related instruction mapping instance is generated by target independent code...
const InstructionMapping & getInstrMappingImpl(const MachineInstr &MI) const
Try to get the mapping of MI.
TargetRegisterInfo base class - We assume that the target defines a static array of TargetRegisterDes...
const InstructionMapping & getInstrMapping(const MachineInstr &MI) const override
Get the mapping of the different operands of MI on the register bank.
WebAssemblyRegisterBankInfo(const TargetRegisterInfo &TRI)
Invariant opcodes: All instruction sets have these as their low opcodes.
const RegisterBankInfo::ValueMapping ValueMappings[]
const RegisterBankInfo::PartialMapping PartMappings[]
This is an optimization pass for GlobalISel generic memory operations.
bool isPreISelGenericOpcode(unsigned Opcode)
Check whether the given Opcode is a generic opcode that is not supposed to appear after ISel.
Helper struct that represents how a value is partially mapped into a register.
Helper struct that represents how a value is mapped through different register banks.