LLVM 19.0.0git
Classes | Functions | Variables
MLRegAllocEvictAdvisor.h File Reference
#include "llvm/Analysis/MLModelRunner.h"
#include "llvm/CodeGen/MachineBasicBlock.h"
#include "llvm/CodeGen/SlotIndexes.h"

Go to the source code of this file.

Classes

struct  LRStartEndInfo
 

Functions

void extractInstructionFeatures (llvm::SmallVectorImpl< LRStartEndInfo > &LRPosInfo, MLModelRunner *RegallocRunner, function_ref< int(SlotIndex)> GetOpcode, function_ref< float(SlotIndex)> GetMBBFreq, function_ref< MachineBasicBlock *(SlotIndex)> GetMBBReference, const int InstructionsIndex, const int InstructionsMappingIndex, const int MBBFreqIndex, const int MBBMappingIndex, const SlotIndex LastIndex)
 
void extractMBBFrequency (const SlotIndex CurrentIndex, const size_t CurrentInstructionIndex, std::map< MachineBasicBlock *, size_t > &VisitedMBBs, function_ref< float(SlotIndex)> GetMBBFreq, MachineBasicBlock *CurrentMBBReference, MLModelRunner *RegallocRunner, const int MBBFreqIndex, const int MBBMappingIndex)
 

Variables

static const int64_t MaxInterferences = 32
 
static const int64_t CandidateVirtRegPos = MaxInterferences
 
static const int64_t NumberOfInterferences = CandidateVirtRegPos + 1
 
static const int ModelMaxSupportedInstructionCount = 300
 
static const std::vector< int64_t > InstructionsShape
 
static const std::vector< int64_t > InstructionsMappingShape
 
static const int64_t ModelMaxSupportedMBBCount = 100
 
static const std::vector< int64_t > MBBFrequencyShape
 

Function Documentation

◆ extractInstructionFeatures()

void extractInstructionFeatures ( llvm::SmallVectorImpl< LRStartEndInfo > &  LRPosInfo,
MLModelRunner RegallocRunner,
function_ref< int(SlotIndex)>  GetOpcode,
function_ref< float(SlotIndex)>  GetMBBFreq,
function_ref< MachineBasicBlock *(SlotIndex)>  GetMBBReference,
const int  InstructionsIndex,
const int  InstructionsMappingIndex,
const int  MBBFreqIndex,
const int  MBBMappingIndex,
const SlotIndex  LastIndex 
)

◆ extractMBBFrequency()

void extractMBBFrequency ( const SlotIndex  CurrentIndex,
const size_t  CurrentInstructionIndex,
std::map< MachineBasicBlock *, size_t > &  VisitedMBBs,
function_ref< float(SlotIndex)>  GetMBBFreq,
MachineBasicBlock CurrentMBBReference,
MLModelRunner RegallocRunner,
const int  MBBFreqIndex,
const int  MBBMappingIndex 
)

Variable Documentation

◆ CandidateVirtRegPos

const int64_t CandidateVirtRegPos = MaxInterferences
static

Definition at line 63 of file MLRegAllocEvictAdvisor.h.

◆ InstructionsMappingShape

const std::vector<int64_t> InstructionsMappingShape
static
Initial value:
{
static const int ModelMaxSupportedInstructionCount
static const int64_t NumberOfInterferences

Definition at line 81 of file MLRegAllocEvictAdvisor.h.

◆ InstructionsShape

const std::vector<int64_t> InstructionsShape
static
Initial value:

Definition at line 79 of file MLRegAllocEvictAdvisor.h.

◆ MaxInterferences

const int64_t MaxInterferences = 32
static

Definition at line 55 of file MLRegAllocEvictAdvisor.h.

◆ MBBFrequencyShape

const std::vector<int64_t> MBBFrequencyShape
static
Initial value:
{1,
static const int64_t ModelMaxSupportedMBBCount

Definition at line 90 of file MLRegAllocEvictAdvisor.h.

◆ ModelMaxSupportedInstructionCount

const int ModelMaxSupportedInstructionCount = 300
static

Definition at line 72 of file MLRegAllocEvictAdvisor.h.

Referenced by extractInstructionFeatures().

◆ ModelMaxSupportedMBBCount

const int64_t ModelMaxSupportedMBBCount = 100
static

Definition at line 89 of file MLRegAllocEvictAdvisor.h.

Referenced by extractMBBFrequency().

◆ NumberOfInterferences

const int64_t NumberOfInterferences = CandidateVirtRegPos + 1
static

Definition at line 64 of file MLRegAllocEvictAdvisor.h.

Referenced by INITIALIZE_PASS().