LLVM 20.0.0git
Classes | Public Member Functions | List of all members
llvm::IROutliner Class Reference

This class is a pass that identifies similarity in a Module, extracts instances of the similarity, and then consolidating the similar regions in an effort to reduce code size. More...

#include "llvm/Transforms/IPO/IROutliner.h"

Public Member Functions

 IROutliner (function_ref< TargetTransformInfo &(Function &)> GTTI, function_ref< IRSimilarityIdentifier &(Module &)> GIRSI, function_ref< OptimizationRemarkEmitter &(Function &)> GORE)
 
bool run (Module &M)
 

Detailed Description

This class is a pass that identifies similarity in a Module, extracts instances of the similarity, and then consolidating the similar regions in an effort to reduce code size.

It uses the IRSimilarityIdentifier pass to identify the similar regions of code, and then extracts the similar sections into a single function. See the above for an example as to how code is extracted and consolidated into a single function.

Definition at line 199 of file IROutliner.h.

Constructor & Destructor Documentation

◆ IROutliner()

llvm::IROutliner::IROutliner ( function_ref< TargetTransformInfo &(Function &)>  GTTI,
function_ref< IRSimilarityIdentifier &(Module &)>  GIRSI,
function_ref< OptimizationRemarkEmitter &(Function &)>  GORE 
)
inline

Definition at line 201 of file IROutliner.h.

References assert().

Member Function Documentation

◆ run()

bool IROutliner::run ( Module M)

Definition at line 3016 of file IROutliner.cpp.

References EnableLinkOnceODRIROutlining, and NoCostModel.

Referenced by llvm::IROutlinerPass::run().


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