MLIR  20.0.0git
Classes | Public Types | Public Member Functions | List of all members
mlir::Inliner Class Reference

This is an implementation of the inliner that operates bottom up over the Strongly Connected Components(SCCs) of the CallGraph. More...

#include "mlir/Transforms/Inliner.h"

Classes

class  Impl
 
struct  ResolvedCall
 This struct represents a resolved call to a given callgraph node. More...
 

Public Types

using RunPipelineHelperTy = std::function< LogicalResult(Pass &pass, OpPassManager &pipeline, Operation *op)>
 
using ProfitabilityCallbackTy = std::function< bool(const ResolvedCall &)>
 Type of the callback answering if it is profitable to inline a callable operation at a call site. More...
 

Public Member Functions

 Inliner (Operation *op, CallGraph &cg, Pass &pass, AnalysisManager am, RunPipelineHelperTy runPipelineHelper, const InlinerConfig &config, ProfitabilityCallbackTy isProfitableToInline)
 
 Inliner (Inliner &)=delete
 
void operator= (const Inliner &)=delete
 
LogicalResult doInlining ()
 Perform inlining on a OpTrait::SymbolTable operation. More...
 

Detailed Description

This is an implementation of the inliner that operates bottom up over the Strongly Connected Components(SCCs) of the CallGraph.

This enables a more incremental propagation of inlining decisions from the leafs to the roots of the callgraph.

Definition at line 69 of file Inliner.h.

Member Typedef Documentation

◆ ProfitabilityCallbackTy

using mlir::Inliner::ProfitabilityCallbackTy = std::function<bool(const ResolvedCall &)>

Type of the callback answering if it is profitable to inline a callable operation at a call site.

It might be the case that the ResolvedCall does not provide enough context to make the profitability decision, so this hook's interface might need to be extended in future.

Definition at line 91 of file Inliner.h.

◆ RunPipelineHelperTy

using mlir::Inliner::RunPipelineHelperTy = std::function<LogicalResult( Pass &pass, OpPassManager &pipeline, Operation *op)>

Definition at line 83 of file Inliner.h.

Constructor & Destructor Documentation

◆ Inliner() [1/2]

mlir::Inliner::Inliner ( Operation op,
CallGraph cg,
Pass pass,
AnalysisManager  am,
RunPipelineHelperTy  runPipelineHelper,
const InlinerConfig config,
ProfitabilityCallbackTy  isProfitableToInline 
)
inline

Definition at line 93 of file Inliner.h.

References mlir::config.

◆ Inliner() [2/2]

mlir::Inliner::Inliner ( Inliner )
delete

Member Function Documentation

◆ doInlining()

LogicalResult mlir::Inliner::doInlining ( )

Perform inlining on a OpTrait::SymbolTable operation.

Definition at line 751 of file Inliner.cpp.

References mlir::Operation::getContext(), and runTransformOnCGSCCs().

◆ operator=()

void mlir::Inliner::operator= ( const Inliner )
delete

The documentation for this class was generated from the following files: