|
LLVM
4.0.0
|
Analysis providing profile information. More...
#include <ProfileSummaryInfo.h>
Public Member Functions | |
| ProfileSummaryInfo (Module &M) | |
| ProfileSummaryInfo (ProfileSummaryInfo &&Arg) | |
| bool | isFunctionEntryHot (const Function *F) |
Returns true if F has hot function entry. More... | |
| bool | isFunctionEntryCold (const Function *F) |
Returns true if F has cold function entry. More... | |
| bool | isHotCount (uint64_t C) |
Returns true if F is a hot function. More... | |
| bool | isColdCount (uint64_t C) |
Returns true if count C is considered cold. More... | |
| bool | isHotBB (const BasicBlock *B, BlockFrequencyInfo *BFI) |
Returns true if BasicBlock B is considered hot. More... | |
Analysis providing profile information.
This is an immutable analysis pass that provides ability to query global (program-level) profile information. The main APIs are isHotCount and isColdCount that tells whether a given profile count is considered hot/cold based on the profile summary. This also provides convenience methods to check whether a function is hot or cold.
Definition at line 43 of file ProfileSummaryInfo.h.
|
inline |
Definition at line 53 of file ProfileSummaryInfo.h.
|
inline |
Definition at line 54 of file ProfileSummaryInfo.h.
| bool ProfileSummaryInfo::isColdCount | ( | uint64_t | C | ) |
Returns true if count C is considered cold.
Definition at line 120 of file ProfileSummaryInfo.cpp.
References llvm::Optional< T >::getValue().
Referenced by getHotness(), and isFunctionEntryCold().
Returns true if F has cold function entry.
Returns true if the function's entry is a cold.
If it returns false, it either means it is not cold or it is unknown whether it is cold or not (for example, no profile data is available).
Definition at line 85 of file ProfileSummaryInfo.cpp.
References llvm::CallingConv::Cold, llvm::Function::getEntryCount(), llvm::Function::hasFnAttribute(), and isColdCount().
Referenced by llvm::ProfileSummaryPrinterPass::run().
Returns true if F has hot function entry.
Returns true if the function's entry is hot.
If it returns false, it either means it is not hot or it is unknown whether it is hot or not (for example, no profile data is available).
Definition at line 71 of file ProfileSummaryInfo.cpp.
References llvm::Function::getEntryCount(), and isHotCount().
Referenced by llvm::ProfileSummaryPrinterPass::run().
| bool ProfileSummaryInfo::isHotBB | ( | const BasicBlock * | B, |
| BlockFrequencyInfo * | BFI | ||
| ) |
Returns true if BasicBlock B is considered hot.
Definition at line 126 of file ProfileSummaryInfo.cpp.
References llvm::Instruction::extractProfTotalWeight(), llvm::BlockFrequencyInfo::getBlockProfileCount(), llvm::BasicBlock::getTerminator(), and isHotCount().
| bool ProfileSummaryInfo::isHotCount | ( | uint64_t | C | ) |
Returns true if F is a hot function.
Definition at line 114 of file ProfileSummaryInfo.cpp.
References llvm::Optional< T >::getValue().
Referenced by getHotness(), isFunctionEntryHot(), and isHotBB().
1.8.6