class SampleProfileReaderItaniumRemapper
Declaration
class SampleProfileReaderItaniumRemapper { /* full declaration omitted */ };
Description
SampleProfileReaderItaniumRemapper remaps the profile data from a sample profile data reader, by applying a provided set of equivalences between components of the symbol names in the profile.
Declared at: llvm/include/llvm/ProfileData/SampleProfReader.h:261
Member Variables
- private std::unique_ptr<MemoryBuffer> Buffer
- private std::unique_ptr<SymbolRemappingReader> Remappings
- private DenseMap<SymbolRemappingReader::Key, llvm::StringRef> NameMap
- private llvm::sampleprof::SampleProfileReader& Reader
- private bool RemappingApplied = false
Method Overview
- public SampleProfileReaderItaniumRemapper(std::unique_ptr<MemoryBuffer> B, std::unique_ptr<SymbolRemappingReader> SRR, llvm::sampleprof::SampleProfileReader & R)
- public void applyRemapping(llvm::LLVMContext & Ctx)
- public static ErrorOr<std::unique_ptr<SampleProfileReaderItaniumRemapper>> create(const std::string Filename, llvm::sampleprof::SampleProfileReader & Reader, llvm::LLVMContext & C)
- public static ErrorOr<std::unique_ptr<SampleProfileReaderItaniumRemapper>> create(std::unique_ptr<MemoryBuffer> & B, llvm::sampleprof::SampleProfileReader & Reader, llvm::LLVMContext & C)
- public bool exist(llvm::StringRef FunctionName)
- public bool hasApplied()
- public void insert(llvm::StringRef FunctionName)
- public Optional<llvm::StringRef> lookUpNameInProfile(llvm::StringRef FunctionName)
Methods
¶SampleProfileReaderItaniumRemapper(
std::unique_ptr<MemoryBuffer> B,
std::unique_ptr<SymbolRemappingReader> SRR,
llvm::sampleprof::SampleProfileReader& R)
SampleProfileReaderItaniumRemapper(
std::unique_ptr<MemoryBuffer> B,
std::unique_ptr<SymbolRemappingReader> SRR,
llvm::sampleprof::SampleProfileReader& R)
Declared at: llvm/include/llvm/ProfileData/SampleProfReader.h:263
Parameters
- std::unique_ptr<MemoryBuffer> B
- std::unique_ptr<SymbolRemappingReader> SRR
- llvm::sampleprof::SampleProfileReader& R
¶void applyRemapping(llvm::LLVMContext& Ctx)
void applyRemapping(llvm::LLVMContext& Ctx)
Description
Apply remappings to the profile read by Reader.
Declared at: llvm/include/llvm/ProfileData/SampleProfReader.h:283
Parameters
- llvm::LLVMContext& Ctx
¶static ErrorOr<std::unique_ptr<
SampleProfileReaderItaniumRemapper>>
create(
const std::string Filename,
llvm::sampleprof::SampleProfileReader& Reader,
llvm::LLVMContext& C)
static ErrorOr<std::unique_ptr<
SampleProfileReaderItaniumRemapper>>
create(
const std::string Filename,
llvm::sampleprof::SampleProfileReader& Reader,
llvm::LLVMContext& C)
Description
Create a remapper from the given remapping file. The remapper will be used for profile read in by Reader.
Declared at: llvm/include/llvm/ProfileData/SampleProfReader.h:273
Parameters
- const std::string Filename
- llvm::sampleprof::SampleProfileReader& Reader
- llvm::LLVMContext& C
¶static ErrorOr<std::unique_ptr<
SampleProfileReaderItaniumRemapper>>
create(
std::unique_ptr<MemoryBuffer>& B,
llvm::sampleprof::SampleProfileReader& Reader,
llvm::LLVMContext& C)
static ErrorOr<std::unique_ptr<
SampleProfileReaderItaniumRemapper>>
create(
std::unique_ptr<MemoryBuffer>& B,
llvm::sampleprof::SampleProfileReader& Reader,
llvm::LLVMContext& C)
Description
Create a remapper from the given Buffer. The remapper will be used for profile read in by Reader.
Declared at: llvm/include/llvm/ProfileData/SampleProfReader.h:279
Parameters
- std::unique_ptr<MemoryBuffer>& B
- llvm::sampleprof::SampleProfileReader& Reader
- llvm::LLVMContext& C
¶bool exist(llvm::StringRef FunctionName)
bool exist(llvm::StringRef FunctionName)
Description
Query whether there is equivalent in the remapper which has been inserted.
Declared at: llvm/include/llvm/ProfileData/SampleProfReader.h:292
Parameters
- llvm::StringRef FunctionName
¶bool hasApplied()
bool hasApplied()
Declared at: llvm/include/llvm/ProfileData/SampleProfReader.h:285
¶void insert(llvm::StringRef FunctionName)
void insert(llvm::StringRef FunctionName)
Description
Insert function name into remapper.
Declared at: llvm/include/llvm/ProfileData/SampleProfReader.h:288
Parameters
- llvm::StringRef FunctionName
¶Optional<llvm::StringRef> lookUpNameInProfile(
llvm::StringRef FunctionName)
Optional<llvm::StringRef> lookUpNameInProfile(
llvm::StringRef FunctionName)
Description
Return the equivalent name in the profile for \p FunctionName if it exists.
Declared at: llvm/include/llvm/ProfileData/SampleProfReader.h:298
Parameters
- llvm::StringRef FunctionName