brintos

brintos / llvm-project-archived public Read only

0
0
Text · 905 B · 8b68df4 Raw
29 lines · cpp
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-exception6//7//===----------------------------------------------------------------------===//8 9#include "llvm/Analysis/EphemeralValuesCache.h"10#include "llvm/Analysis/AssumptionCache.h"11#include "llvm/Analysis/CodeMetrics.h"12 13namespace llvm {14 15void EphemeralValuesCache::collectEphemeralValues() {16  CodeMetrics::collectEphemeralValues(&F, &AC, EphValues);17  Collected = true;18}19 20AnalysisKey EphemeralValuesAnalysis::Key;21 22EphemeralValuesCache23EphemeralValuesAnalysis::run(Function &F, FunctionAnalysisManager &FAM) {24  auto &AC = FAM.getResult<AssumptionAnalysis>(F);25  return EphemeralValuesCache(F, AC);26}27 28} // namespace llvm29