Skip to content

Commit 070738b

Browse files
[MemProf][NFC] Explicitly specify llvm version of function_ref (#77783)
As suggested in #75823, to avoid confusion with std::function_ref, qualify all uses with llvm:: (we were already using the llvm version, but this avoids ambiguity).
1 parent ab39841 commit 070738b

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

llvm/lib/Transforms/IPO/MemProfContextDisambiguation.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ class ModuleCallsiteContextGraph
578578
public:
579579
ModuleCallsiteContextGraph(
580580
Module &M,
581-
function_ref<OptimizationRemarkEmitter &(Function *)> OREGetter);
581+
llvm::function_ref<OptimizationRemarkEmitter &(Function *)> OREGetter);
582582

583583
private:
584584
friend CallsiteContextGraph<ModuleCallsiteContextGraph, Function,
@@ -606,7 +606,7 @@ class ModuleCallsiteContextGraph
606606
unsigned CloneNo) const;
607607

608608
const Module &Mod;
609-
function_ref<OptimizationRemarkEmitter &(Function *)> OREGetter;
609+
llvm::function_ref<OptimizationRemarkEmitter &(Function *)> OREGetter;
610610
};
611611

612612
/// Represents a call in the summary index graph, which can either be an
@@ -641,7 +641,7 @@ class IndexCallsiteContextGraph
641641
public:
642642
IndexCallsiteContextGraph(
643643
ModuleSummaryIndex &Index,
644-
function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
644+
llvm::function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
645645
isPrevailing);
646646

647647
~IndexCallsiteContextGraph() {
@@ -687,7 +687,7 @@ class IndexCallsiteContextGraph
687687
std::map<const FunctionSummary *, ValueInfo> FSToVIMap;
688688

689689
const ModuleSummaryIndex &Index;
690-
function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
690+
llvm::function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
691691
isPrevailing;
692692

693693
// Saves/owns the callsite info structures synthesized for missing tail call
@@ -1524,7 +1524,8 @@ CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::getStackIdsWithContextNodes(
15241524
}
15251525

15261526
ModuleCallsiteContextGraph::ModuleCallsiteContextGraph(
1527-
Module &M, function_ref<OptimizationRemarkEmitter &(Function *)> OREGetter)
1527+
Module &M,
1528+
llvm::function_ref<OptimizationRemarkEmitter &(Function *)> OREGetter)
15281529
: Mod(M), OREGetter(OREGetter) {
15291530
for (auto &F : M) {
15301531
std::vector<CallInfo> CallsWithMetadata;
@@ -1583,7 +1584,7 @@ ModuleCallsiteContextGraph::ModuleCallsiteContextGraph(
15831584

15841585
IndexCallsiteContextGraph::IndexCallsiteContextGraph(
15851586
ModuleSummaryIndex &Index,
1586-
function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
1587+
llvm::function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
15871588
isPrevailing)
15881589
: Index(Index), isPrevailing(isPrevailing) {
15891590
for (auto &I : Index) {
@@ -3623,7 +3624,7 @@ bool CallsiteContextGraph<DerivedCCG, FuncTy, CallTy>::process() {
36233624

36243625
bool MemProfContextDisambiguation::processModule(
36253626
Module &M,
3626-
function_ref<OptimizationRemarkEmitter &(Function *)> OREGetter) {
3627+
llvm::function_ref<OptimizationRemarkEmitter &(Function *)> OREGetter) {
36273628

36283629
// If we have an import summary, then the cloning decisions were made during
36293630
// the thin link on the index. Apply them and return.
@@ -3690,7 +3691,7 @@ PreservedAnalyses MemProfContextDisambiguation::run(Module &M,
36903691

36913692
void MemProfContextDisambiguation::run(
36923693
ModuleSummaryIndex &Index,
3693-
function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
3694+
llvm::function_ref<bool(GlobalValue::GUID, const GlobalValueSummary *)>
36943695
isPrevailing) {
36953696
// TODO: If/when other types of memprof cloning are enabled beyond just for
36963697
// hot and cold, we will need to change this to individually control the

0 commit comments

Comments
 (0)