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

The information necessary to create an outlined function that is matched globally. More...

#include "llvm/CodeGen/MachineOutliner.h"

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

Public Member Functions

 GlobalOutlinedFunction (std::unique_ptr< OutlinedFunction > OF, unsigned GlobalOccurrenceCount)
 
unsigned getOccurrenceCount () const override
 Return the number of times that appear globally.
 
unsigned getOutliningCost () const override
 Return the outlining cost using the global occurrence count with the same cost as the first (unique) candidate.
 
 GlobalOutlinedFunction ()=delete
 
 ~GlobalOutlinedFunction ()=default
 
- Public Member Functions inherited from llvm::outliner::OutlinedFunction
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

unsigned GlobalOccurrenceCount
 
- Public Attributes inherited from llvm::outliner::OutlinedFunction
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 that is matched globally.

Definition at line 281 of file MachineOutliner.h.

Constructor & Destructor Documentation

◆ GlobalOutlinedFunction() [1/2]

llvm::outliner::GlobalOutlinedFunction::GlobalOutlinedFunction ( std::unique_ptr< OutlinedFunction OF,
unsigned  GlobalOccurrenceCount 
)
inlineexplicit

Definition at line 282 of file MachineOutliner.h.

◆ GlobalOutlinedFunction() [2/2]

llvm::outliner::GlobalOutlinedFunction::GlobalOutlinedFunction ( )
delete

◆ ~GlobalOutlinedFunction()

llvm::outliner::GlobalOutlinedFunction::~GlobalOutlinedFunction ( )
default

Member Function Documentation

◆ getOccurrenceCount()

unsigned llvm::outliner::GlobalOutlinedFunction::getOccurrenceCount ( ) const
inlineoverridevirtual

Return the number of times that appear globally.

Global outlining candidate is uniquely created per each match, but this might be erased out when it's overlapped with the previous outlining instance.

Reimplemented from llvm::outliner::OutlinedFunction.

Definition at line 292 of file MachineOutliner.h.

References assert(), llvm::outliner::OutlinedFunction::Candidates, and GlobalOccurrenceCount.

Referenced by getOutliningCost().

◆ getOutliningCost()

unsigned llvm::outliner::GlobalOutlinedFunction::getOutliningCost ( ) const
inlineoverridevirtual

Return the outlining cost using the global occurrence count with the same cost as the first (unique) candidate.

Reimplemented from llvm::outliner::OutlinedFunction.

Definition at line 299 of file MachineOutliner.h.

References assert(), llvm::outliner::OutlinedFunction::Candidates, llvm::outliner::OutlinedFunction::FrameOverhead, getOccurrenceCount(), and llvm::outliner::OutlinedFunction::SequenceSize.

Member Data Documentation

◆ GlobalOccurrenceCount

unsigned llvm::outliner::GlobalOutlinedFunction::GlobalOccurrenceCount

Definition at line 286 of file MachineOutliner.h.

Referenced by getOccurrenceCount().


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