LLVM  16.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 
16 namespace llvm {
17 class CallBase;
18 
19 template <typename T> class InlineOrder {
20 public:
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 
34 std::unique_ptr<InlineOrder<std::pair<CallBase *, int>>>
35 getInlineOrder(FunctionAnalysisManager &FAM, const InlineParams &Params);
36 
37 } // namespace llvm
38 #endif // LLVM_ANALYSIS_INLINEORDER_H
llvm
This is an optimization pass for GlobalISel generic memory operations.
Definition: AddressRanges.h:18
FAM
FunctionAnalysisManager FAM
Definition: PassBuilderBindings.cpp:59
T
#define T
Definition: Mips16ISelLowering.cpp:341
llvm::InlineOrder
Definition: InlineOrder.h:19
STLFunctionalExtras.h
llvm::InlineOrder::pop
virtual T pop()=0
llvm::function_ref
An efficient, type-erasing, non-owning reference to a callable.
Definition: STLFunctionalExtras.h:36
llvm::getInlineOrder
std::unique_ptr< InlineOrder< std::pair< CallBase *, int > > > getInlineOrder(FunctionAnalysisManager &FAM, const InlineParams &Params)
Definition: InlineOrder.cpp:217
llvm::InlineOrder::erase_if
virtual void erase_if(function_ref< bool(T)> Pred)=0
InlineCost.h
llvm::InlineOrder::empty
bool empty()
Definition: InlineOrder.h:31
llvm::InlineOrder::~InlineOrder
virtual ~InlineOrder()=default
llvm::InlineOrder::push
virtual void push(const T &Elt)=0
llvm::InlineOrder::size
virtual size_t size()=0
llvm::FunctionAnalysisManager
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
Definition: PassManager.h:912