LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::outliner::OutlinedFunction Struct Reference

The information necessary to create an outlined function for some class of candidate. More...

#include "llvm/CodeGen/MachineOutliner.h"

Inheritance diagram for llvm::outliner::OutlinedFunction:
Inheritance graph
[legend]

Public Member Functions

virtual unsigned getOccurrenceCount () const
 Return the number of candidates for this OutlinedFunction.
 
virtual unsigned getOutliningCost () const
 Return the number of bytes it would take to outline this function.
 
unsigned getNotOutlinedCost () const
 Return the size in bytes of the unoutlined sequences.
 
unsigned getBenefit () const
 Return the number of instructions that would be saved by outlining this function.
 
unsigned getNumInstrs () const
 Return the number of instructions in this sequence.
 
 OutlinedFunction (std::vector< Candidate > &Candidates, unsigned SequenceSize, unsigned FrameOverhead, unsigned FrameConstructionID)
 
 OutlinedFunction ()=delete
 
virtual ~OutlinedFunction ()=default
 

Public Attributes

std::vector< CandidateCandidates
 
MachineFunctionMF = nullptr
 The actual outlined function created.
 
unsigned SequenceSize = 0
 Represents the size of a sequence in bytes.
 
unsigned FrameOverhead = 0
 Target-defined overhead of constructing a frame for this function.
 
unsigned FrameConstructionID = 0
 Target-defined identifier for constructing a frame for this function.
 

Detailed Description

The information necessary to create an outlined function for some class of candidate.

Definition at line 218 of file MachineOutliner.h.

Constructor & Destructor Documentation

◆ OutlinedFunction() [1/2]

llvm::outliner::OutlinedFunction::OutlinedFunction ( std::vector< Candidate > &  Candidates,
unsigned  SequenceSize,
unsigned  FrameOverhead,
unsigned  FrameConstructionID 
)
inline

Definition at line 266 of file MachineOutliner.h.

References B, llvm::CallingConv::C, Candidates, and getBenefit().

◆ OutlinedFunction() [2/2]

llvm::outliner::OutlinedFunction::OutlinedFunction ( )
delete

◆ ~OutlinedFunction()

virtual llvm::outliner::OutlinedFunction::~OutlinedFunction ( )
virtualdefault

Member Function Documentation

◆ getBenefit()

unsigned llvm::outliner::OutlinedFunction::getBenefit ( ) const
inline

Return the number of instructions that would be saved by outlining this function.

Definition at line 256 of file MachineOutliner.h.

References getNotOutlinedCost(), and getOutliningCost().

Referenced by OutlinedFunction().

◆ getNotOutlinedCost()

unsigned llvm::outliner::OutlinedFunction::getNotOutlinedCost ( ) const
inline

Return the size in bytes of the unoutlined sequences.

Definition at line 250 of file MachineOutliner.h.

References getOccurrenceCount(), and SequenceSize.

Referenced by getBenefit().

◆ getNumInstrs()

unsigned llvm::outliner::OutlinedFunction::getNumInstrs ( ) const
inline

Return the number of instructions in this sequence.

Definition at line 264 of file MachineOutliner.h.

References Candidates.

◆ getOccurrenceCount()

virtual unsigned llvm::outliner::OutlinedFunction::getOccurrenceCount ( ) const
inlinevirtual

Return the number of candidates for this OutlinedFunction.

Reimplemented in llvm::outliner::GlobalOutlinedFunction.

Definition at line 238 of file MachineOutliner.h.

References Candidates.

Referenced by getNotOutlinedCost().

◆ getOutliningCost()

virtual unsigned llvm::outliner::OutlinedFunction::getOutliningCost ( ) const
inlinevirtual

Return the number of bytes it would take to outline this function.

Reimplemented in llvm::outliner::GlobalOutlinedFunction.

Definition at line 242 of file MachineOutliner.h.

References llvm::CallingConv::C, Candidates, FrameOverhead, and SequenceSize.

Referenced by getBenefit().

Member Data Documentation

◆ Candidates

std::vector<Candidate> llvm::outliner::OutlinedFunction::Candidates

◆ FrameConstructionID

unsigned llvm::outliner::OutlinedFunction::FrameConstructionID = 0

Target-defined identifier for constructing a frame for this function.

Definition at line 235 of file MachineOutliner.h.

Referenced by llvm::AArch64InstrInfo::buildOutlinedFrame(), llvm::ARMBaseInstrInfo::buildOutlinedFrame(), llvm::RISCVInstrInfo::buildOutlinedFrame(), and llvm::X86InstrInfo::buildOutlinedFrame().

◆ FrameOverhead

unsigned llvm::outliner::OutlinedFunction::FrameOverhead = 0

Target-defined overhead of constructing a frame for this function.

Definition at line 232 of file MachineOutliner.h.

Referenced by getOutliningCost(), and llvm::outliner::GlobalOutlinedFunction::getOutliningCost().

◆ MF

MachineFunction* llvm::outliner::OutlinedFunction::MF = nullptr

The actual outlined function created.

This is initialized after we go through and create the actual function.

Definition at line 225 of file MachineOutliner.h.

◆ SequenceSize

unsigned llvm::outliner::OutlinedFunction::SequenceSize = 0

Represents the size of a sequence in bytes.

(Some instructions vary widely in size, so just counting the instructions isn't very useful.)

Definition at line 229 of file MachineOutliner.h.

Referenced by getNotOutlinedCost(), getOutliningCost(), and llvm::outliner::GlobalOutlinedFunction::getOutliningCost().


The documentation for this struct was generated from the following file: