LLVM 17.0.0git
InlineOrder.h
Go to the documentation of this file.
1//===- InlineOrder.h - Inlining order abstraction -*- 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#ifndef LLVM_ANALYSIS_INLINEORDER_H
10#define LLVM_ANALYSIS_INLINEORDER_H
11
14#include <utility>
15
16namespace llvm {
17class CallBase;
18
19template <typename T> class InlineOrder {
20public:
21 virtual ~InlineOrder() = default;
22
23 virtual size_t size() = 0;
24
25 virtual void push(const T &Elt) = 0;
26
27 virtual T pop() = 0;
28
29 virtual void erase_if(function_ref<bool(T)> Pred) = 0;
30
31 bool empty() { return !size(); }
32};
33
34std::unique_ptr<InlineOrder<std::pair<CallBase *, int>>>
35getInlineOrder(FunctionAnalysisManager &FAM, const InlineParams &Params);
36
37} // namespace llvm
38#endif // LLVM_ANALYSIS_INLINEORDER_H
FunctionAnalysisManager FAM
virtual T pop()=0
virtual size_t size()=0
virtual void erase_if(function_ref< bool(T)> Pred)=0
virtual ~InlineOrder()=default
virtual void push(const T &Elt)=0
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
std::unique_ptr< InlineOrder< std::pair< CallBase *, int > > > getInlineOrder(FunctionAnalysisManager &FAM, const InlineParams &Params)
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
Definition: PassManager.h:912