LLVM  14.0.0git
InlineSizeEstimatorAnalysis.h
Go to the documentation of this file.
1 //===- InlineSizeEstimatorAnalysis.h - ML size estimator --------*- C++ -*-===//
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 
10 #ifndef LLVM_ANALYSIS_INLINESIZEESTIMATORANALYSIS_H
11 #define LLVM_ANALYSIS_INLINESIZEESTIMATORANALYSIS_H
12 
13 #include "llvm/IR/PassManager.h"
14 
15 namespace llvm {
16 class Function;
17 
18 class TFModelEvaluator;
20  : public AnalysisInfoMixin<InlineSizeEstimatorAnalysis> {
21 public:
25 
26  static AnalysisKey Key;
29  static bool isEvaluatorRequested();
30 
31 private:
32  std::unique_ptr<TFModelEvaluator> Evaluator;
33 };
34 
36  : public PassInfoMixin<InlineSizeEstimatorAnalysisPrinterPass> {
37  raw_ostream &OS;
38 
39 public:
41 
43 };
44 } // namespace llvm
45 #endif // LLVM_ANALYSIS_INLINESIZEESTIMATORANALYSIS_H
llvm::PreservedAnalyses
A set of analyses that are preserved following a run of a transformation pass.
Definition: PassManager.h:155
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AllocatorList.h:23
llvm::InlineSizeEstimatorAnalysis::isEvaluatorRequested
static bool isEvaluatorRequested()
Definition: InlineSizeEstimatorAnalysis.cpp:273
llvm::PassInfoMixin
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:374
llvm::Function
Definition: Function.h:62
llvm::InlineSizeEstimatorAnalysisPrinterPass::InlineSizeEstimatorAnalysisPrinterPass
InlineSizeEstimatorAnalysisPrinterPass(raw_ostream &OS)
Definition: InlineSizeEstimatorAnalysis.h:40
FAM
FunctionAnalysisManager FAM
Definition: PassBuilderBindings.cpp:59
llvm::Optional< size_t >
F
#define F(x, y, z)
Definition: MD5.cpp:56
llvm::InlineSizeEstimatorAnalysisPrinterPass::run
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Definition: InlineSizeEstimatorAnalysis.cpp:277
llvm::raw_ostream
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:53
llvm::InlineSizeEstimatorAnalysis
Definition: InlineSizeEstimatorAnalysis.h:19
llvm::AnalysisKey
A special type used by analysis passes to provide an address that identifies that particular analysis...
Definition: PassManager.h:72
llvm::Evaluator
This class evaluates LLVM IR, producing the Constant representing each SSA instruction.
Definition: Evaluator.h:38
llvm::InlineSizeEstimatorAnalysis::~InlineSizeEstimatorAnalysis
~InlineSizeEstimatorAnalysis()
Definition: InlineSizeEstimatorAnalysis.cpp:267
llvm::AnalysisInfoMixin
A CRTP mix-in that provides informational APIs needed for analysis passes.
Definition: PassManager.h:397
llvm::InlineSizeEstimatorAnalysis::Key
static AnalysisKey Key
Definition: InlineSizeEstimatorAnalysis.h:26
llvm::InlineSizeEstimatorAnalysis::InlineSizeEstimatorAnalysis
InlineSizeEstimatorAnalysis()
Definition: InlineSizeEstimatorAnalysis.cpp:264
PassManager.h
llvm::AnalysisManager
A container for analyses that lazily runs them and caches their results.
Definition: InstructionSimplify.h:44
llvm::InlineSizeEstimatorAnalysisPrinterPass
Definition: InlineSizeEstimatorAnalysis.h:35
llvm::codeview::PublicSymFlags::Function
@ Function
llvm::InlineSizeEstimatorAnalysis::run
Result run(const Function &F, FunctionAnalysisManager &FAM)
Definition: InlineSizeEstimatorAnalysis.cpp:269