LLVM 20.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
15namespace llvm {
16class Function;
17
18class TFModelEvaluator;
20 : public AnalysisInfoMixin<InlineSizeEstimatorAnalysis> {
21public:
25
27 using Result = std::optional<size_t>;
29 static bool isEvaluatorRequested();
30
31private:
32 std::unique_ptr<TFModelEvaluator> Evaluator;
33};
34
36 : public PassInfoMixin<InlineSizeEstimatorAnalysisPrinterPass> {
37 raw_ostream &OS;
38
39public:
41
43
44 static bool isRequired() { return true; }
45};
46} // namespace llvm
47#endif // LLVM_ANALYSIS_INLINESIZEESTIMATORANALYSIS_H
This header defines various interfaces for pass management in LLVM.
#define F(x, y, z)
Definition: MD5.cpp:55
FunctionAnalysisManager FAM
raw_pwrite_stream & OS
A container for analyses that lazily runs them and caches their results.
Definition: PassManager.h:253
This class evaluates LLVM IR, producing the Constant representing each SSA instruction.
Definition: Evaluator.h:37
PreservedAnalyses run(Function &F, FunctionAnalysisManager &AM)
Result run(const Function &F, FunctionAnalysisManager &FAM)
A set of analyses that are preserved following a run of a transformation pass.
Definition: Analysis.h:111
This class implements an extremely fast bulk output stream that can only output to a stream.
Definition: raw_ostream.h:52
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
A CRTP mix-in that provides informational APIs needed for analysis passes.
Definition: PassManager.h:92
A special type used by analysis passes to provide an address that identifies that particular analysis...
Definition: Analysis.h:28
A CRTP mix-in to automatically provide informational APIs needed for passes.
Definition: PassManager.h:69