Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,9 @@ template <> struct IRTraits<BasicBlock> {
// SampleProfileProber.
class PseudoProbeManager {
DenseMap<uint64_t, PseudoProbeDescriptor> GUIDToProbeDescMap;
const ThinOrFullLTOPhase LTOPhase;

public:
PseudoProbeManager(const Module &M,
ThinOrFullLTOPhase LTOPhase = ThinOrFullLTOPhase::None)
: LTOPhase(LTOPhase) {
PseudoProbeManager(const Module &M) {
if (NamedMDNode *FuncInfo =
M.getNamedMetadata(PseudoProbeDescMetadataName)) {
for (const auto *Operand : FuncInfo->operands()) {
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/IPO/SampleProfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2059,7 +2059,7 @@ bool SampleProfileLoader::doInitialization(Module &M,

// Load pseudo probe descriptors for probe-based function samples.
if (Reader->profileIsProbeBased()) {
ProbeManager = std::make_unique<PseudoProbeManager>(M, LTOPhase);
ProbeManager = std::make_unique<PseudoProbeManager>(M);
if (!ProbeManager->moduleIsProbed(M)) {
const char *Msg =
"Pseudo-probe-based profile requires SampleProfileProbePass";
Expand Down