LLVM 20.0.0git
|
This file implements the RegisterBankInfo class. More...
#include "llvm/CodeGen/RegisterBankInfo.h"
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/ADT/iterator_range.h"
#include "llvm/CodeGen/MachineFunction.h"
#include "llvm/CodeGen/MachineRegisterInfo.h"
#include "llvm/CodeGen/RegisterBank.h"
#include "llvm/CodeGen/TargetOpcodes.h"
#include "llvm/CodeGen/TargetRegisterInfo.h"
#include "llvm/CodeGen/TargetSubtargetInfo.h"
#include "llvm/Config/llvm-config.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. | |
static hash_code | hashPartialMapping (unsigned StartIdx, unsigned Length, const RegisterBank *RegBank) |
Hashing function for PartialMapping. | |
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 29 of file RegisterBankInfo.cpp.
|
static |
Definition at line 375 of file RegisterBankInfo.cpp.
References llvm::hash_combine().
|
static |
Hashing function for PartialMapping.
Definition at line 268 of file RegisterBankInfo.cpp.
References llvm::RegisterBank::getID(), llvm::hash_combine(), and llvm::Length.
Referenced by llvm::RegisterBankInfo::getPartialMapping(), and llvm::hash_value().
|
static |
Definition at line 304 of file RegisterBankInfo.cpp.
References llvm::SmallVectorTemplateCommon< T, typename >::begin(), llvm::SmallVectorTemplateCommon< T, typename >::end(), llvm::hash_combine_range(), llvm::hash_value(), Idx, LLVM_LIKELY, and llvm::SmallVectorTemplateBase< T, bool >::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 156 of file RegisterBankInfo.cpp.
References MI.
Referenced by llvm::RegisterBankInfo::getInstrMappingImpl(), and llvm::RegisterBankInfo::InstructionMapping::verify().
STATISTIC | ( | NumInstructionMappingsAccessed | , |
"Number of instruction mappings dynamically accessed" | |||
) |
STATISTIC | ( | NumInstructionMappingsCreated | , |
"Number of instruction mappings dynamically created" | |||
) |
STATISTIC | ( | NumOperandsMappingsAccessed | , |
"Number of operands mappings dynamically accessed" | |||
) |
STATISTIC | ( | NumOperandsMappingsCreated | , |
"Number of operands mappings dynamically created" | |||
) |
STATISTIC | ( | NumPartialMappingsAccessed | , |
"Number of partial mappings dynamically accessed" | |||
) |
STATISTIC | ( | NumPartialMappingsCreated | , |
"Number of partial mappings dynamically created" | |||
) |
STATISTIC | ( | NumValueMappingsAccessed | , |
"Number of value mappings dynamically accessed" | |||
) |
STATISTIC | ( | NumValueMappingsCreated | , |
"Number of value mappings dynamically created" | |||
) |