@@ -271,8 +271,7 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> {
271271 CallBase &CandidateCall;
272272
273273 // / Getter for the cache of ephemeral values.
274- function_ref<EphemeralValuesAnalysis::Result &(Function &)>
275- GetEphValuesCache = nullptr ;
274+ function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache = nullptr ;
276275
277276 // / Extension points for handling callsite features.
278277 // Called before a basic block was analyzed.
@@ -516,8 +515,8 @@ class CallAnalyzer : public InstVisitor<CallAnalyzer, bool> {
516515 function_ref<const TargetLibraryInfo &(Function &)> GetTLI = nullptr ,
517516 ProfileSummaryInfo *PSI = nullptr ,
518517 OptimizationRemarkEmitter *ORE = nullptr ,
519- function_ref<EphemeralValuesAnalysis::Result &(Function &)>
520- GetEphValuesCache = nullptr )
518+ function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache =
519+ nullptr )
521520 : TTI(TTI), GetAssumptionCache(GetAssumptionCache), GetBFI(GetBFI),
522521 GetTLI (GetTLI), PSI(PSI), F(Callee), DL(F.getDataLayout()), ORE(ORE),
523522 CandidateCall(Call), GetEphValuesCache(GetEphValuesCache) {}
@@ -1134,8 +1133,8 @@ class InlineCostCallAnalyzer final : public CallAnalyzer {
11341133 ProfileSummaryInfo *PSI = nullptr ,
11351134 OptimizationRemarkEmitter *ORE = nullptr , bool BoostIndirect = true ,
11361135 bool IgnoreThreshold = false ,
1137- function_ref<EphemeralValuesAnalysis::Result &(Function &)>
1138- GetEphValuesCache = nullptr )
1136+ function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache =
1137+ nullptr )
11391138 : CallAnalyzer(Callee, Call, TTI, GetAssumptionCache, GetBFI, GetTLI, PSI,
11401139 ORE, GetEphValuesCache),
11411140 ComputeFullInlineCost (OptComputeFullInlineCost ||
@@ -2795,7 +2794,7 @@ InlineResult CallAnalyzer::analyze() {
27952794 SmallPtrSet<const Value *, 32 > EphValuesStorage;
27962795 const SmallPtrSetImpl<const Value *> *EphValues = &EphValuesStorage;
27972796 if (GetEphValuesCache)
2798- EphValues = &GetEphValuesCache (F);
2797+ EphValues = &GetEphValuesCache (F). ephValues () ;
27992798 else
28002799 CodeMetrics::collectEphemeralValues (&F, &GetAssumptionCache (F),
28012800 EphValuesStorage);
@@ -2981,8 +2980,7 @@ InlineCost llvm::getInlineCost(
29812980 function_ref<const TargetLibraryInfo &(Function &)> GetTLI,
29822981 function_ref<BlockFrequencyInfo &(Function &)> GetBFI,
29832982 ProfileSummaryInfo *PSI, OptimizationRemarkEmitter *ORE,
2984- function_ref<EphemeralValuesAnalysis::Result &(Function &)>
2985- GetEphValuesCache) {
2983+ function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache) {
29862984 return getInlineCost (Call, Call.getCalledFunction (), Params, CalleeTTI,
29872985 GetAssumptionCache, GetTLI, GetBFI, PSI, ORE,
29882986 GetEphValuesCache);
@@ -3106,8 +3104,7 @@ InlineCost llvm::getInlineCost(
31063104 function_ref<const TargetLibraryInfo &(Function &)> GetTLI,
31073105 function_ref<BlockFrequencyInfo &(Function &)> GetBFI,
31083106 ProfileSummaryInfo *PSI, OptimizationRemarkEmitter *ORE,
3109- function_ref<EphemeralValuesAnalysis::Result &(Function &)>
3110- GetEphValuesCache) {
3107+ function_ref<EphemeralValuesCache &(Function &)> GetEphValuesCache) {
31113108
31123109 auto UserDecision =
31133110 llvm::getAttributeBasedInliningDecision (Call, Callee, CalleeTTI, GetTLI);
0 commit comments