1 //===- EphemeralValuesCache.cpp - Cache collecting ephemeral values -------===// 2 // 3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 4 // See https://llvm.org/LICENSE.txt for license information. 5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 6 // 7 //===----------------------------------------------------------------------===// 8 9 #include "llvm/Analysis/EphemeralValuesCache.h" 10 #include "llvm/Analysis/AssumptionCache.h" 11 #include "llvm/Analysis/CodeMetrics.h" 12 13 namespace llvm { 14 15 void EphemeralValuesCache::collectEphemeralValues() { 16 CodeMetrics::collectEphemeralValues(&F, &AC, EphValues); 17 Collected = true; 18 } 19 20 AnalysisKey EphemeralValuesAnalysis::Key; 21 22 EphemeralValuesCache 23 EphemeralValuesAnalysis::run(Function &F, FunctionAnalysisManager &FAM) { 24 auto &AC = FAM.getResult<AssumptionAnalysis>(F); 25 return EphemeralValuesCache(F, AC); 26 } 27 28 } // namespace llvm 29