class MIRProfileLoaderPass

Declaration

class MIRProfileLoaderPass : public MachineFunctionPass { /* full declaration omitted */ };

Description

MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of passes that operate on the MachineFunction representation. Instead of overriding runOnFunction, subclasses override runOnMachineFunction.

Declared at: llvm/include/llvm/CodeGen/MIRSampleProfile.h:32

Inherits from: MachineFunctionPass

Member Variables

private llvm::MachineFunction* MF
private std::string ProfileFileName
private llvm::sampleprof::FSDiscriminatorPass P
private unsigned int LowBit
private unsigned int HighBit
private std::unique_ptr<MIRProfileLoader> MIRSampleLoader
private llvm::MachineBlockFrequencyInfo* MBFI
Hold the information of the basic block frequency.
public static char ID

Method Overview

Inherited from MachineFunctionPass:

Inherited from FunctionPass:

Inherited from Pass:

Methods

MIRProfileLoaderPass(
    std::string FileName = "",
    std::string RemappingFileName = "",
    llvm::sampleprof::FSDiscriminatorPass P =
        FSDiscriminatorPass::Pass1)

Description

FS bits will only use the '1' bits in the Mask.

Declared at: llvm/include/llvm/CodeGen/MIRSampleProfile.h:42

Parameters

std::string FileName = ""
std::string RemappingFileName = ""
llvm::sampleprof::FSDiscriminatorPass P = FSDiscriminatorPass::Pass1

bool doInitialization(llvm::Module& M)

Description

doInitialization - Virtual method overridden by subclasses to do any necessary initialization before any pass is run.

Declared at: llvm/include/llvm/CodeGen/MIRSampleProfile.h:54

Parameters

llvm::Module& M

void getAnalysisUsage(
    llvm::AnalysisUsage& AU) const

Description

getAnalysisUsage - Subclasses that override getAnalysisUsage must call this. For MachineFunctionPasses, calling AU.preservesCFG() indicates that the pass does not modify the MachineBasicBlock CFG.

Declared at: llvm/include/llvm/CodeGen/MIRSampleProfile.h:55

Parameters

llvm::AnalysisUsage& AU

const llvm::MachineFunction* getMachineFunction()
    const

Description

getMachineFunction - Return the last machine function computed.

Declared at: llvm/include/llvm/CodeGen/MIRSampleProfile.h:47

llvm::StringRef getPassName() const

Description

getPassName - Return a nice clean name for a pass. This usually implemented in terms of the name that is registered by one of the Registration templates, but can be overloaded directly.

Declared at: llvm/include/llvm/CodeGen/MIRSampleProfile.h:49

void init(llvm::MachineFunction& MF)

Declared at: llvm/include/llvm/CodeGen/MIRSampleProfile.h:52

Parameters

llvm::MachineFunction& MF

bool runOnMachineFunction(llvm::MachineFunction&)

Description

runOnMachineFunction - This method must be overloaded to perform the desired machine code transformation or analysis.

Declared at: llvm/include/llvm/CodeGen/MIRSampleProfile.h:53

Parameters

llvm::MachineFunction&