LLVM  4.0.0
Public Member Functions | List of all members
llvm::ProfileSummaryInfo Class Reference

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...
 

Detailed Description

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.

Constructor & Destructor Documentation

llvm::ProfileSummaryInfo::ProfileSummaryInfo ( Module M)
inline

Definition at line 53 of file ProfileSummaryInfo.h.

llvm::ProfileSummaryInfo::ProfileSummaryInfo ( ProfileSummaryInfo &&  Arg)
inline

Definition at line 54 of file ProfileSummaryInfo.h.

Member Function Documentation

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().

bool ProfileSummaryInfo::isFunctionEntryCold ( const Function F)

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().

bool ProfileSummaryInfo::isFunctionEntryHot ( const Function F)

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 
)
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().


The documentation for this class was generated from the following files: