MLIR 22.0.0git
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
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.

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.

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 103 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 125 of file Inliner.h.

◆ RunPipelineHelperTy

Initial value:
std::function<LogicalResult(
Pass &pass, OpPassManager &pipeline, Operation *op)>
This class represents a pass manager that runs passes on either a specific operation type,...
Definition PassManager.h:46
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88
The abstract base pass class.
Definition Pass.h:51

Definition at line 117 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 127 of file Inliner.h.

Referenced by mlir::Inliner::Impl::Impl(), Inliner(), and operator=().

◆ Inliner() [2/2]

mlir::Inliner::Inliner ( Inliner & )
delete

References Inliner().

Member Function Documentation

◆ doInlining()

LogicalResult mlir::Inliner::doInlining ( )

Perform inlining on a OpTrait::SymbolTable operation.

Definition at line 750 of file Inliner.cpp.

References result, runTransformOnCGSCCs(), and success().

◆ operator=()

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

References Inliner().


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