LLVM 17.0.0git
|
Public Member Functions | |
void | setInitVals (MachineDominatorTree *MDT, MachinePostDominatorTree *MPDT, MachineLoopInfo *MLI, MachineBlockFrequencyInfo *MBFI, MachineOptimizationRemarkEmitter *MORE) |
void | setFSPass (FSDiscriminatorPass Pass) |
MIRProfileLoader (StringRef Name, StringRef RemapName) | |
void | setBranchProbs (MachineFunction &F) |
bool | runOnFunction (MachineFunction &F) |
bool | doInitialization (Module &M) |
bool | isValid () const |
![]() | |
SampleProfileLoaderBaseImpl (std::string Name, std::string RemapName) | |
void | dump () |
Protected Attributes | |
MachineBlockFrequencyInfo * | BFI |
Hold the information of the basic block frequency. | |
FSDiscriminatorPass | P |
PassNum is the sequence number this pass is called, start from 1. | |
unsigned | LowBit |
unsigned | HighBit |
bool | ProfileIsValid = true |
![]() | |
DenseMap< const DILocation *, const FunctionSamples * > | DILocation2SampleMap |
BlockWeightMap | BlockWeights |
Map basic blocks to their computed weights. | |
EdgeWeightMap | EdgeWeights |
Map edges to their computed weights. | |
SmallPtrSet< const BasicBlockT *, 32 > | VisitedBlocks |
Set of visited blocks during propagation. | |
SmallSet< Edge, 32 > | VisitedEdges |
Set of visited edges during propagation. | |
EquivalenceClassMap | EquivalenceClass |
Equivalence classes for block weights. | |
DominatorTreePtrT | DT |
Dominance, post-dominance and loop information. | |
PostDominatorTreePtrT | PDT |
LoopInfoPtrT | LI |
BlockEdgeMap | Predecessors |
Predecessors for each basic block in the CFG. | |
BlockEdgeMap | Successors |
Successors for each basic block in the CFG. | |
SampleCoverageTracker | CoverageTracker |
Profile coverage tracker. | |
std::unique_ptr< SampleProfileReader > | Reader |
Profile reader object. | |
FunctionSamples * | Samples |
Samples collected for the body of this function. | |
std::string | Filename |
Name of the profile file to load. | |
std::string | RemappingFilename |
Name of the profile remapping file to load. | |
ProfileSummaryInfo * | PSI |
Profile Summary Info computed from sample profile. | |
OptRemarkEmitterT * | ORE |
Optimization Remark Emitter used to emit diagnostic remarks. | |
Friends | |
class | SampleCoverageTracker |
Definition at line 120 of file MIRSampleProfile.cpp.
Definition at line 139 of file MIRSampleProfile.cpp.
References string.
Definition at line 254 of file MIRSampleProfile.cpp.
References llvm::sampleprof::SampleProfileReader::create(), llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::Filename, P, ProfileIsValid, llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::Reader, llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::RemappingFilename, and llvm::success.
|
inline |
Definition at line 146 of file MIRSampleProfile.cpp.
References ProfileIsValid.
bool llvm::MIRProfileLoader::runOnFunction | ( | MachineFunction & | F | ) |
Definition at line 273 of file MIRSampleProfile.cpp.
References llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::clearFunctionData(), llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::computeAndPropagateWeights(), llvm::sampleprof::FunctionSamples::empty(), llvm::MachineFunction::getFunction(), llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::getFunctionLoc(), llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::Reader, llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::Samples, and setBranchProbs().
void llvm::MIRProfileLoader::setBranchProbs | ( | MachineFunction & | F | ) |
Definition at line 171 of file MIRSampleProfile.cpp.
References assert(), BFI, llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::BlockWeights, llvm::dbgs(), E, llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::EdgeWeights, llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::EquivalenceClass, F, llvm::MachineBasicBlock::findBranchDebugLoc(), FSProfileDebugBWThreshold, FSProfileDebugProbDiffThreshold, llvm::MachineBranchProbabilityInfo::getEdgeProbability(), llvm::MachineBlockFrequencyInfo::getMBPI(), llvm::MachineBasicBlock::getNumber(), LLVM_DEBUG, llvm::MachineBasicBlock::setSuccProbability(), ShowFSBranchProb, SI, llvm::MachineBasicBlock::succ_begin(), llvm::MachineBasicBlock::succ_end(), llvm::MachineBasicBlock::succ_size(), and llvm::MachineBasicBlock::successors().
Referenced by runOnFunction().
|
inline |
Definition at line 132 of file MIRSampleProfile.cpp.
References assert(), llvm::getFSPassBitBegin(), llvm::getFSPassBitEnd(), HighBit, LowBit, and P.
|
inline |
Definition at line 123 of file MIRSampleProfile.cpp.
References BFI, llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::DT, llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::LI, MORE, llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::ORE, and llvm::SampleProfileLoaderBaseImpl< MachineBasicBlock >::PDT.
|
friend |
Definition at line 149 of file MIRSampleProfile.cpp.
|
protected |
Hold the information of the basic block frequency.
Definition at line 152 of file MIRSampleProfile.cpp.
Referenced by setBranchProbs(), and setInitVals().
|
protected |
Definition at line 162 of file MIRSampleProfile.cpp.
Referenced by setFSPass().
|
protected |
Definition at line 159 of file MIRSampleProfile.cpp.
Referenced by setFSPass().
|
protected |
PassNum is the sequence number this pass is called, start from 1.
Definition at line 155 of file MIRSampleProfile.cpp.
Referenced by doInitialization(), and setFSPass().
Definition at line 164 of file MIRSampleProfile.cpp.
Referenced by doInitialization(), and isValid().