LLVM  5.0.0
Protected Types | Static Protected Member Functions | Static Protected Attributes | List of all members
llvm::AArch64GenRegisterBankInfo Class Reference

#include "Target/AArch64/AArch64RegisterBankInfo.h"

Inheritance diagram for llvm::AArch64GenRegisterBankInfo:
[legend]
Collaboration diagram for llvm::AArch64GenRegisterBankInfo:
[legend]

Protected Types

enum  PartialMappingIdx {
  PMI_None = -1, PMI_FPR32 = 1, PMI_FPR64, PMI_FPR128,
  PMI_FPR256, PMI_FPR512, PMI_GPR32, PMI_GPR64,
  PMI_FirstGPR = PMI_GPR32, PMI_LastGPR = PMI_GPR64, PMI_FirstFPR = PMI_FPR32, PMI_LastFPR = PMI_FPR512,
  PMI_Min = PMI_FirstFPR
}
 
enum  ValueMappingIdx {
  InvalidIdx = 0, First3OpsIdx = 1, Last3OpsIdx = 19, DistanceBetweenRegBanks = 3,
  FirstCrossRegCpyIdx = 22, LastCrossRegCpyIdx = 34, DistanceBetweenCrossRegCpy = 2
}
 

Static Protected Member Functions

static bool checkPartialMap (unsigned Idx, unsigned ValStartIdx, unsigned ValLength, const RegisterBank &RB)
 
static bool checkValueMapImpl (unsigned Idx, unsigned FirstInBank, unsigned Size, unsigned Offset)
 
static bool checkPartialMappingIdx (PartialMappingIdx FirstAlias, PartialMappingIdx LastAlias, ArrayRef< PartialMappingIdx > Order)
 
static unsigned getRegBankBaseIdxOffset (unsigned RBIdx, unsigned Size)
 
static const
RegisterBankInfo::ValueMapping * 
getValueMapping (PartialMappingIdx RBIdx, unsigned Size)
 Get the pointer to the ValueMapping representing the RegisterBank at RBIdx with a size of Size. More...
 
static const
RegisterBankInfo::ValueMapping * 
getCopyMapping (unsigned DstBankID, unsigned SrcBankID, unsigned Size)
 Get the pointer to the ValueMapping of the operands of a copy instruction from the SrcBankID register bank to the DstBankID register bank with a size of Size. More...
 

Static Protected Attributes

static
RegisterBankInfo::PartialMapping 
PartMappings []
 
static
RegisterBankInfo::ValueMapping 
ValMappings []
 
static PartialMappingIdx BankIDToCopyMapIdx []
 

Additional Inherited Members

- Public Types inherited from llvm::RegisterBankInfo
using InstructionMappings = SmallVector< const InstructionMapping *, 4 >
 Convenient type to represent the alternatives for mapping an instruction. More...
 
- Public Member Functions inherited from llvm::RegisterBankInfo
const RegisterBank * getRegBankFromConstraints (const MachineInstr &MI, unsigned OpIdx, const TargetInstrInfo &TII, const TargetRegisterInfo &TRI) const
 Get the register bank for the OpIdx-th operand of MI form the encoding constraints, if any. More...
 
virtual void applyMappingImpl (const OperandsMapper &OpdMapper) const
 See applyMapping. More...
 
virtual ~RegisterBankInfo ()=default
 
const RegisterBank & getRegBank (unsigned ID) const
 Get the register bank identified by ID. More...
 
const RegisterBank * getRegBank (unsigned Reg, const MachineRegisterInfo &MRI, const TargetRegisterInfo &TRI) const
 Get the register bank of Reg. More...
 
unsigned getNumRegBanks () const
 Get the total number of register banks. More...
 
virtual const RegisterBank & getRegBankFromRegClass (const TargetRegisterClass &RC) const
 Get a register bank that covers RC. More...
 
virtual unsigned copyCost (const RegisterBank &A, const RegisterBank &B, unsigned Size) const
 Get the cost of a copy from B to A, or put differently, get the cost of A = COPY B. More...
 
virtual const InstructionMapping & getInstrMapping (const MachineInstr &MI) const
 Get the mapping of the different operands of MI on the register bank. More...
 
virtual InstructionMappings getInstrAlternativeMappings (const MachineInstr &MI) const
 Get the alternative mappings for MI. More...
 
const InstructionMapping & getInstructionMapping (unsigned ID, unsigned Cost, const ValueMapping *OperandsMapping, unsigned NumOperands) const
 Method to get a uniquely generated InstructionMapping. More...
 
const InstructionMapping & getInvalidInstructionMapping () const
 Method to get a uniquely generated invalid InstructionMapping. More...
 
- Static Public Member Functions inherited from llvm::RegisterBankInfo
static void applyDefaultMapping (const OperandsMapper &OpdMapper)
 Helper method to apply something that is like the default mapping. More...
 
static const TargetRegisterClass * constrainGenericRegister (unsigned Reg, const TargetRegisterClass &RC, MachineRegisterInfo &MRI)
 Constrain the (possibly generic) virtual register Reg to RC. More...
 
- Public Attributes inherited from llvm::RegisterBankInfo
struct
llvm::RegisterBankInfo::PartialMapping 
ScalarAddx2
 
 VectorAdd
 Get the possible mapping for MI. More...
 
- Static Public Attributes inherited from llvm::RegisterBankInfo
static const unsigned DefaultMappingID = UINT_MAX
 Identifier used when the related instruction mapping instance is generated by target independent code. More...
 
static const unsigned InvalidMappingID = UINT_MAX - 1
 Identifier used when the related instruction mapping instance is generated by the default constructor. More...
 
- Protected Member Functions inherited from llvm::RegisterBankInfo
 RegisterBankInfo (RegisterBank **RegBanks, unsigned NumRegBanks)
 Create a RegisterBankInfo that can accommodate up to NumRegBanks RegisterBank instances. More...
 
 RegisterBankInfo ()
 This constructor is meaningless. More...
 
RegisterBank & getRegBank (unsigned ID)
 Get the register bank identified by ID. More...
 
const InstructionMapping & getInstrMappingImpl (const MachineInstr &MI) const
 Try to get the mapping of MI. More...
 
const PartialMapping & getPartialMapping (unsigned StartIdx, unsigned Length, const RegisterBank &RegBank) const
 Get the uniquely generated PartialMapping for the given arguments. More...
 
const ValueMapping & getValueMapping (unsigned StartIdx, unsigned Length, const RegisterBank &RegBank) const
 The most common ValueMapping consists of a single PartialMapping. More...
 
const ValueMapping & getValueMapping (const PartialMapping *BreakDown, unsigned NumBreakDowns) const
 Get the ValueMapping for the given arguments. More...
 
template<typename Iterator >
const ValueMapping * getOperandsMapping (Iterator Begin, Iterator End) const
 Get the uniquely generated array of ValueMapping for the elements of between Begin and End. More...
 
const ValueMapping * getOperandsMapping (const SmallVectorImpl< const ValueMapping * > &OpdsMapping) const
 Get the uniquely generated array of ValueMapping for the elements of OpdsMapping. More...
 
const ValueMapping * getOperandsMapping (std::initializer_list< const ValueMapping * > OpdsMapping) const
 Get the uniquely generated array of ValueMapping for the given arguments. More...
 
- Protected Attributes inherited from llvm::RegisterBankInfo
RegisterBank ** RegBanks
 Hold the set of supported register banks. More...
 
unsigned NumRegBanks
 Total number of register banks. More...
 
DenseMap< unsigned,
std::unique_ptr< const
PartialMapping > > 
MapOfPartialMappings
 Keep dynamically allocated PartialMapping in a separate map. More...
 
DenseMap< unsigned,
std::unique_ptr< const
ValueMapping > > 
MapOfValueMappings
 Keep dynamically allocated ValueMapping in a separate map. More...
 
DenseMap< unsigned,
std::unique_ptr< ValueMapping[]> > 
MapOfOperandsMappings
 Keep dynamically allocated array of ValueMapping in a separate map. More...
 
DenseMap< unsigned,
std::unique_ptr< const
InstructionMapping > > 
MapOfInstructionMappings
 Keep dynamically allocated InstructionMapping in a separate map. More...
 

Detailed Description

Definition at line 26 of file AArch64RegisterBankInfo.h.

Member Enumeration Documentation

Enumerator
PMI_None 
PMI_FPR32 
PMI_FPR64 
PMI_FPR128 
PMI_FPR256 
PMI_FPR512 
PMI_GPR32 
PMI_GPR64 
PMI_FirstGPR 
PMI_LastGPR 
PMI_FirstFPR 
PMI_LastFPR 
PMI_Min 

Definition at line 29 of file AArch64RegisterBankInfo.h.

Enumerator
InvalidIdx 
First3OpsIdx 
Last3OpsIdx 
DistanceBetweenRegBanks 
FirstCrossRegCpyIdx 
LastCrossRegCpyIdx 
DistanceBetweenCrossRegCpy 

Definition at line 49 of file AArch64RegisterBankInfo.h.

Member Function Documentation

static bool llvm::AArch64GenRegisterBankInfo::checkPartialMap ( unsigned  Idx,
unsigned  ValStartIdx,
unsigned  ValLength,
const RegisterBank &  RB 
)
staticprotected
static bool llvm::AArch64GenRegisterBankInfo::checkPartialMappingIdx ( PartialMappingIdx  FirstAlias,
PartialMappingIdx  LastAlias,
ArrayRef< PartialMappingIdx >  Order 
)
staticprotected
static bool llvm::AArch64GenRegisterBankInfo::checkValueMapImpl ( unsigned  Idx,
unsigned  FirstInBank,
unsigned  Size,
unsigned  Offset 
)
staticprotected
static const RegisterBankInfo::ValueMapping* llvm::AArch64GenRegisterBankInfo::getCopyMapping ( unsigned  DstBankID,
unsigned  SrcBankID,
unsigned  Size 
)
staticprotected

Get the pointer to the ValueMapping of the operands of a copy instruction from the SrcBankID register bank to the DstBankID register bank with a size of Size.

Referenced by llvm::AArch64RegisterBankInfo::getInstrAlternativeMappings(), and llvm::AArch64RegisterBankInfo::getInstrMapping().

static unsigned llvm::AArch64GenRegisterBankInfo::getRegBankBaseIdxOffset ( unsigned  RBIdx,
unsigned  Size 
)
staticprotected
static const RegisterBankInfo::ValueMapping* llvm::AArch64GenRegisterBankInfo::getValueMapping ( PartialMappingIdx  RBIdx,
unsigned  Size 
)
staticprotected

Get the pointer to the ValueMapping representing the RegisterBank at RBIdx with a size of Size.

The returned mapping works for instructions with the same kind of operands for up to 3 operands.

Precondition
RBIdx != PartialMappingIdx::None

Referenced by llvm::AArch64RegisterBankInfo::getInstrAlternativeMappings(), and llvm::AArch64RegisterBankInfo::getInstrMapping().

Member Data Documentation

PartialMappingIdx llvm::AArch64GenRegisterBankInfo::BankIDToCopyMapIdx[]
staticprotected

Definition at line 47 of file AArch64RegisterBankInfo.h.

RegisterBankInfo::PartialMapping llvm::AArch64GenRegisterBankInfo::PartMappings[]
staticprotected
RegisterBankInfo::ValueMapping llvm::AArch64GenRegisterBankInfo::ValMappings[]
staticprotected

Definition at line 46 of file AArch64RegisterBankInfo.h.


The documentation for this class was generated from the following file: