LLVM 20.0.0git
Classes | Namespaces | Macros | Typedefs | Functions | Variables
MIRSampleProfile.cpp File Reference
#include "llvm/CodeGen/MIRSampleProfile.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/Analysis/BlockFrequencyInfoImpl.h"
#include "llvm/CodeGen/MachineBlockFrequencyInfo.h"
#include "llvm/CodeGen/MachineBranchProbabilityInfo.h"
#include "llvm/CodeGen/MachineDominators.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/CodeGen/MachineLoopInfo.h"
#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
#include "llvm/CodeGen/MachinePostDominators.h"
#include "llvm/CodeGen/Passes.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/PseudoProbe.h"
#include "llvm/InitializePasses.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/VirtualFileSystem.h"
#include "llvm/Support/raw_ostream.h"
#include "llvm/Transforms/Utils/SampleProfileLoaderBaseImpl.h"
#include "llvm/Transforms/Utils/SampleProfileLoaderBaseUtil.h"
#include <optional>

Go to the source code of this file.

Classes

struct  llvm::afdo_detail::IRTraits< MachineBasicBlock >
 
class  llvm::MIRProfileLoader
 

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.
 
namespace  llvm::afdo_detail
 

Macros

#define DEBUG_TYPE   "fs-profile-loader"
 

Typedefs

using ProfileCount = Function::ProfileCount
 

Functions

 INITIALIZE_PASS_BEGIN (MIRProfileLoaderPass, DEBUG_TYPE, "Load MIR Sample Profile", false, false) INITIALIZE_PASS_END(MIRProfileLoaderPass
 
std::optional< PseudoProbellvm::extractProbe (const MachineInstr &MI)
 

Variables

static cl::opt< boolShowFSBranchProb ("show-fs-branchprob", cl::Hidden, cl::init(false), cl::desc("Print setting flow sensitive branch probabilities"))
 
static cl::opt< unsignedFSProfileDebugProbDiffThreshold ("fs-profile-debug-prob-diff-threshold", cl::init(10), cl::desc("Only show debug message if the branch probility is greater than " "this value (in percentage)."))
 
static cl::opt< unsignedFSProfileDebugBWThreshold ("fs-profile-debug-bw-threshold", cl::init(10000), cl::desc("Only show debug message if the source branch weight is greater " " than this value."))
 
static cl::opt< boolViewBFIBefore ("fs-viewbfi-before", cl::Hidden, cl::init(false), cl::desc("View BFI before MIR loader"))
 
static cl::opt< boolViewBFIAfter ("fs-viewbfi-after", cl::Hidden, cl::init(false), cl::desc("View BFI after MIR loader"))
 
 DEBUG_TYPE
 
Load MIR Sample Profile
 
Load MIR Sample false
 

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "fs-profile-loader"

Definition at line 42 of file MIRSampleProfile.cpp.

Typedef Documentation

◆ ProfileCount

Definition at line 40 of file MIRSampleProfile.cpp.

Function Documentation

◆ INITIALIZE_PASS_BEGIN()

INITIALIZE_PASS_BEGIN ( MIRProfileLoaderPass  ,
DEBUG_TYPE  ,
"Load MIR Sample Profile"  ,
false  ,
false   
)

Variable Documentation

◆ DEBUG_TYPE

DEBUG_TYPE

Definition at line 77 of file MIRSampleProfile.cpp.

◆ false

Load MIR Sample false

Definition at line 78 of file MIRSampleProfile.cpp.

◆ FSProfileDebugBWThreshold

cl::opt< unsigned > FSProfileDebugBWThreshold("fs-profile-debug-bw-threshold", cl::init(10000), cl::desc("Only show debug message if the source branch weight is greater " " than this value.")) ( "fs-profile-debug-bw-threshold"  ,
cl::init(10000)  ,
cl::desc("Only show debug message if the source branch weight is greater " " than this value.")   
)
static

◆ FSProfileDebugProbDiffThreshold

cl::opt< unsigned > FSProfileDebugProbDiffThreshold("fs-profile-debug-prob-diff-threshold", cl::init(10), cl::desc("Only show debug message if the branch probility is greater than " "this value (in percentage).")) ( "fs-profile-debug-prob-diff-threshold"  ,
cl::init(10)  ,
cl::desc("Only show debug message if the branch probility is greater than " "this value (in percentage).")   
)
static

◆ Profile

Load MIR Sample Profile

◆ ShowFSBranchProb

cl::opt< bool > ShowFSBranchProb("show-fs-branchprob", cl::Hidden, cl::init(false), cl::desc("Print setting flow sensitive branch probabilities")) ( "show-fs-branchprob"  ,
cl::Hidden  ,
cl::init(false)  ,
cl::desc("Print setting flow sensitive branch probabilities")   
)
static

◆ ViewBFIAfter

cl::opt< bool > ViewBFIAfter("fs-viewbfi-after", cl::Hidden, cl::init(false), cl::desc("View BFI after MIR loader")) ( "fs-viewbfi-after"  ,
cl::Hidden  ,
cl::init(false)  ,
cl::desc("View BFI after MIR loader")   
)
static

◆ ViewBFIBefore

cl::opt< bool > ViewBFIBefore("fs-viewbfi-before", cl::Hidden, cl::init(false), cl::desc("View BFI before MIR loader")) ( "fs-viewbfi-before"  ,
cl::Hidden  ,
cl::init(false)  ,
cl::desc("View BFI before MIR loader")   
)
static