@@ -271,7 +271,8 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> {
271271 CallBase &CandidateCall;
272272
273273 // / Getter for the cache of ephemeral values.
274- function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache = nullptr ;
274+ function_ref<EphemeralValuesAnalysis::Result &(Function &)>
275+ GetEphValuesCache = nullptr ;
275276
276277 // / Extension points for handling callsite features.
277278 // Called before a basic block was analyzed.
@@ -515,8 +516,8 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> {
515516 function_ref<const TargetLibraryInfo &(Function &)> GetTLI = nullptr ,
516517 ProfileSummaryInfo *PSI = nullptr ,
517518 OptimizationRemarkEmitter *ORE = nullptr ,
518- function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache =
519- nullptr )
519+ function_ref<EphemeralValuesAnalysis::Result &(Function &)>
520+ GetEphValuesCache = nullptr )
520521 : TTI(TTI), GetAssumptionCache(GetAssumptionCache), GetBFI(GetBFI),
521522 GetTLI (GetTLI), PSI(PSI), F(Callee), DL(F.getDataLayout()), ORE(ORE),
522523 CandidateCall(Call), GetEphValuesCache(GetEphValuesCache) {}
@@ -1133,8 +1134,8 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
11331134 ProfileSummaryInfo *PSI = nullptr ,
11341135 OptimizationRemarkEmitter *ORE = nullptr , bool BoostIndirect = true ,
11351136 bool IgnoreThreshold = false ,
1136- function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache =
1137- nullptr )
1137+ function_ref<EphemeralValuesAnalysis::Result &(Function &)>
1138+ GetEphValuesCache = nullptr )
11381139 : CallAnalyzer(Callee, Call, TTI, GetAssumptionCache, GetBFI, GetTLI, PSI,
11391140 ORE, GetEphValuesCache),
11401141 ComputeFullInlineCost (OptComputeFullInlineCost ||
@@ -2794,7 +2795,7 @@ InlineResult CallAnalyzer::analyze() {
27942795 SmallPtrSet<const Value *, 32 > EphValuesStorage;
27952796 const SmallPtrSetImpl<const Value *> *EphValues = &EphValuesStorage;
27962797 if (GetEphValuesCache)
2797- EphValues = &GetEphValuesCache (F). ephValues () ;
2798+ EphValues = &GetEphValuesCache (F);
27982799 else
27992800 CodeMetrics::collectEphemeralValues (&F, &GetAssumptionCache (F),
28002801 EphValuesStorage);
@@ -2980,7 +2981,8 @@ InlineCost llvm::getInlineCost(
29802981 function_ref<const TargetLibraryInfo &(Function &)> GetTLI,
29812982 function_ref<BlockFrequencyInfo &(Function &)> GetBFI,
29822983 ProfileSummaryInfo *PSI, OptimizationRemarkEmitter *ORE,
2983- function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache) {
2984+ function_ref<EphemeralValuesAnalysis::Result &(Function &)>
2985+ GetEphValuesCache) {
29842986 return getInlineCost (Call, Call.getCalledFunction (), Params, CalleeTTI,
29852987 GetAssumptionCache, GetTLI, GetBFI, PSI, ORE,
29862988 GetEphValuesCache);
@@ -3104,7 +3106,8 @@ InlineCost llvm::getInlineCost(
31043106 function_ref<const TargetLibraryInfo &(Function &)> GetTLI,
31053107 function_ref<BlockFrequencyInfo &(Function &)> GetBFI,
31063108 ProfileSummaryInfo *PSI, OptimizationRemarkEmitter *ORE,
3107- function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache) {
3109+ function_ref<EphemeralValuesAnalysis::Result &(Function &)>
3110+ GetEphValuesCache) {
31083111
31093112 auto UserDecision =
31103113 llvm::getAttributeBasedInliningDecision (Call, Callee, CalleeTTI, GetTLI);
0 commit comments