LLVM
8.0.1
|
This file implements the RegisterBankInfo class. More...
#include "llvm/CodeGen/GlobalISel/RegisterBankInfo.h"
#include "llvm/ADT/SmallString.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/CodeGen/GlobalISel/RegisterBank.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/Config/llvm-config.h"
#include "llvm/IR/Type.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"
#include <algorithm>
Go to the source code of this file.
Macros | |
#define | DEBUG_TYPE "registerbankinfo" |
Functions | |
STATISTIC (NumPartialMappingsCreated, "Number of partial mappings dynamically created") | |
STATISTIC (NumPartialMappingsAccessed, "Number of partial mappings dynamically accessed") | |
STATISTIC (NumValueMappingsCreated, "Number of value mappings dynamically created") | |
STATISTIC (NumValueMappingsAccessed, "Number of value mappings dynamically accessed") | |
STATISTIC (NumOperandsMappingsCreated, "Number of operands mappings dynamically created") | |
STATISTIC (NumOperandsMappingsAccessed, "Number of operands mappings dynamically accessed") | |
STATISTIC (NumInstructionMappingsCreated, "Number of instruction mappings dynamically created") | |
STATISTIC (NumInstructionMappingsAccessed, "Number of instruction mappings dynamically accessed") | |
static bool | isCopyLike (const MachineInstr &MI) |
Check whether or not MI should be treated like a copy for the mappings. More... | |
static hash_code | hashPartialMapping (unsigned StartIdx, unsigned Length, const RegisterBank *RegBank) |
Hashing function for PartialMapping. More... | |
static hash_code | hashValueMapping (const RegisterBankInfo::PartialMapping *BreakDown, unsigned NumBreakDowns) |
static hash_code | hashInstructionMapping (unsigned ID, unsigned Cost, const RegisterBankInfo::ValueMapping *OperandsMapping, unsigned NumOperands) |
This file implements the RegisterBankInfo class.
Definition in file RegisterBankInfo.cpp.
#define DEBUG_TYPE "registerbankinfo" |
Definition at line 32 of file RegisterBankInfo.cpp.
|
static |
Definition at line 340 of file RegisterBankInfo.cpp.
References assert(), llvm::hash_combine(), if(), llvm::RegisterBankInfo::InvalidMappingID, and llvm::RegisterBankInfo::MapOfInstructionMappings.
|
static |
Hashing function for PartialMapping.
Definition at line 233 of file RegisterBankInfo.cpp.
References llvm::RegisterBank::getID(), llvm::hash_combine(), llvm::hash_value(), llvm::RegisterBankInfo::PartialMapping::Length, llvm::RegisterBankInfo::PartialMapping::RegBank, and llvm::RegisterBankInfo::PartialMapping::StartIdx.
Referenced by llvm::RegisterBankInfo::getPartialMapping().
|
static |
Definition at line 269 of file RegisterBankInfo.cpp.
References llvm::SmallVectorTemplateCommon< T >::begin(), llvm::SmallVectorTemplateCommon< T >::end(), llvm::hash_combine_range(), llvm::hash_value(), LLVM_LIKELY, and llvm::SmallVectorTemplateBase< T >::push_back().
Referenced by llvm::RegisterBankInfo::getValueMapping().
|
static |
Check whether or not MI
should be treated like a copy for the mappings.
Copy like instruction are special for mapping because they don't have actual register constraints. Moreover, they sometimes have register classes assigned and we can just use that instead of failing to provide a generic mapping.
Definition at line 152 of file RegisterBankInfo.cpp.
References llvm::MachineInstr::getOpcode(), llvm::MachineInstr::isCopy(), and llvm::MachineInstr::isPHI().
Referenced by llvm::RegisterBankInfo::getInstrMappingImpl(), and llvm::RegisterBankInfo::InstructionMapping::verify().
STATISTIC | ( | NumPartialMappingsCreated | , |
"Number of partial mappings dynamically created" | |||
) |
STATISTIC | ( | NumPartialMappingsAccessed | , |
"Number of partial mappings dynamically accessed" | |||
) |
STATISTIC | ( | NumValueMappingsCreated | , |
"Number of value mappings dynamically created" | |||
) |
STATISTIC | ( | NumValueMappingsAccessed | , |
"Number of value mappings dynamically accessed" | |||
) |
STATISTIC | ( | NumOperandsMappingsCreated | , |
"Number of operands mappings dynamically created" | |||
) |
STATISTIC | ( | NumOperandsMappingsAccessed | , |
"Number of operands mappings dynamically accessed" | |||
) |
STATISTIC | ( | NumInstructionMappingsCreated | , |
"Number of instruction mappings dynamically created" | |||
) |
STATISTIC | ( | NumInstructionMappingsAccessed | , |
"Number of instruction mappings dynamically accessed" | |||
) |