LLVM  8.0.1
Public Member Functions | List of all members
llvm::sampleprof::FunctionSamples::GUIDToFuncNameMapper Class Reference

#include "llvm/ProfileData/SampleProf.h"

Public Member Functions

 GUIDToFuncNameMapper (Module &M)
 
 ~GUIDToFuncNameMapper ()
 

Detailed Description

Definition at line 453 of file SampleProf.h.

Constructor & Destructor Documentation

◆ GUIDToFuncNameMapper()

llvm::sampleprof::FunctionSamples::GUIDToFuncNameMapper::GUIDToFuncNameMapper ( Module M)
inline

Local to global var promotion used by optimization like thinlto will rename the var and add suffix like ".llvm.xxx" to the original local name. In sample profile, the suffixes of function names are all stripped. Since it is possible that the mapper is built in post-thin-link phase and var promotion has been done, we need to add the substring of function name without the suffix into the GUIDToFuncNameMap.

Definition at line 455 of file SampleProf.h.

References F(), llvm::StringRef::find(), llvm::GlobalValue::getGUID(), llvm::DenseMapBase< DenseMap< KeyT, ValueT, KeyInfoT, BucketT >, KeyT, ValueT, KeyInfoT, BucketT >::insert(), llvm::StringRef::npos, llvm::sampleprof::SPF_Compact_Binary, and llvm::StringRef::substr().

◆ ~GUIDToFuncNameMapper()

llvm::sampleprof::FunctionSamples::GUIDToFuncNameMapper::~GUIDToFuncNameMapper ( )
inline

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