LLVM  5.0.0
Macros | Functions
AArch64RegisterBankInfo.cpp File Reference

This file implements the targeting of the RegisterBankInfo class for AArch64. More...

#include "AArch64RegisterBankInfo.h"
#include "AArch64InstrInfo.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/CodeGen/GlobalISel/RegisterBank.h"
#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
#include "llvm/CodeGen/LowLevelType.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineOperand.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Target/TargetOpcodes.h"
#include "llvm/Target/TargetRegisterInfo.h"
#include "llvm/Target/TargetSubtargetInfo.h"
#include <algorithm>
#include <cassert>
#include "AArch64GenRegisterBank.inc"
#include "AArch64GenRegisterBankInfo.def"
Include dependency graph for AArch64RegisterBankInfo.cpp:

Go to the source code of this file.

Macros

#define GET_TARGET_REGBANK_IMPL
 
#define CHECK_PARTIALMAP(Idx, ValStartIdx, ValLength, RB)
 
#define CHECK_VALUEMAP_IMPL(RBName, Size, Offset)
 
#define CHECK_VALUEMAP(RBName, Size)   CHECK_VALUEMAP_IMPL(RBName, Size, 0)
 
#define CHECK_VALUEMAP_3OPS(RBName, Size)
 
#define CHECK_VALUEMAP_CROSSREGCPY(RBNameDst, RBNameSrc, Size)
 

Functions

static bool isPreISelGenericFloatingPointOpcode (unsigned Opc)
 Returns whether opcode Opc is a pre-isel generic floating-point opcode, having only floating-point operands. More...
 

Detailed Description

This file implements the targeting of the RegisterBankInfo class for AArch64.

Todo:
This should be generated by TableGen.

Definition in file AArch64RegisterBankInfo.cpp.

Macro Definition Documentation

#define CHECK_PARTIALMAP (   Idx,
  ValStartIdx,
  ValLength,
  RB 
)
Value:
do { \
checkPartialMap(PartialMappingIdx::Idx, ValStartIdx, ValLength, RB) && \
#Idx " is incorrectly initialized"); \
} while (false)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

Referenced by llvm::AArch64RegisterBankInfo::AArch64RegisterBankInfo().

#define CHECK_VALUEMAP (   RBName,
  Size 
)    CHECK_VALUEMAP_IMPL(RBName, Size, 0)
#define CHECK_VALUEMAP_3OPS (   RBName,
  Size 
)
Value:
do { \
CHECK_VALUEMAP_IMPL(RBName, Size, 2); \
} while (false)
#define CHECK_VALUEMAP_IMPL(RBName, Size, Offset)
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.

Referenced by llvm::AArch64RegisterBankInfo::AArch64RegisterBankInfo().

#define CHECK_VALUEMAP_CROSSREGCPY (   RBNameDst,
  RBNameSrc,
  Size 
)
Value:
do { \
unsigned PartialMapDstIdx = PMI_##RBNameDst##Size - PMI_Min; \
unsigned PartialMapSrcIdx = PMI_##RBNameSrc##Size - PMI_Min; \
(void)PartialMapDstIdx; \
(void)PartialMapSrcIdx; \
const ValueMapping *Map = getCopyMapping( \
AArch64::RBNameDst##RegBankID, AArch64::RBNameSrc##RegBankID, Size); \
(void)Map; \
assert(Map[0].BreakDown == \
Map[0].NumBreakDowns == 1 && #RBNameDst #Size \
" Dst is incorrectly initialized"); \
assert(Map[1].BreakDown == \
Map[1].NumBreakDowns == 1 && #RBNameSrc #Size \
" Src is incorrectly initialized"); \
\
} while (false)
RegisterBankInfo::PartialMapping PartMappings[]
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
Helper struct that represents how a value is mapped through different register banks.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
aarch64 promote const

Referenced by llvm::AArch64RegisterBankInfo::AArch64RegisterBankInfo().

#define CHECK_VALUEMAP_IMPL (   RBName,
  Size,
  Offset 
)
Value:
do { \
assert(checkValueMapImpl(PartialMappingIdx::PMI_##RBName##Size, \
PartialMappingIdx::PMI_First##RBName, Size, \
Offset) && \
#RBName #Size " " #Offset " is incorrectly initialized"); \
} while (false)
constexpr char Size[]
Key for Kernel::Arg::Metadata::mSize.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
#define GET_TARGET_REGBANK_IMPL

Definition at line 32 of file AArch64RegisterBankInfo.cpp.

Function Documentation

static bool isPreISelGenericFloatingPointOpcode ( unsigned  Opc)
static

Returns whether opcode Opc is a pre-isel generic floating-point opcode, having only floating-point operands.

Definition at line 362 of file AArch64RegisterBankInfo.cpp.

Referenced by llvm::AArch64RegisterBankInfo::getInstrMapping().