LLVM 20.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::InlineFunctionInfo Class Reference

This class captures the data input to the InlineFunction call, and records the auxiliary results produced by it. More...

#include "llvm/Transforms/Utils/Cloning.h"

Public Member Functions

 InlineFunctionInfo (function_ref< AssumptionCache &(Function &)> GetAssumptionCache=nullptr, ProfileSummaryInfo *PSI=nullptr, BlockFrequencyInfo *CallerBFI=nullptr, BlockFrequencyInfo *CalleeBFI=nullptr, bool UpdateProfile=true)
 
void reset ()
 

Public Attributes

function_ref< AssumptionCache &(Function &)> GetAssumptionCache
 If non-null, InlineFunction will update the callgraph to reflect the changes it makes.
 
ProfileSummaryInfoPSI
 
BlockFrequencyInfoCallerBFI
 
BlockFrequencyInfoCalleeBFI
 
SmallVector< AllocaInst *, 4 > StaticAllocas
 InlineFunction fills this in with all static allocas that get copied into the caller.
 
SmallVector< WeakTrackingVH, 8 > InlinedCalls
 InlineFunction fills this in with callsites that were inlined from the callee.
 
SmallVector< CallBase *, 8 > InlinedCallSites
 All of the new call sites inlined into the caller.
 
bool UpdateProfile
 Update profile for callee as well as cloned version.
 

Detailed Description

This class captures the data input to the InlineFunction call, and records the auxiliary results produced by it.

Definition at line 203 of file Cloning.h.

Constructor & Destructor Documentation

◆ InlineFunctionInfo()

llvm::InlineFunctionInfo::InlineFunctionInfo ( function_ref< AssumptionCache &(Function &)>  GetAssumptionCache = nullptr,
ProfileSummaryInfo PSI = nullptr,
BlockFrequencyInfo CallerBFI = nullptr,
BlockFrequencyInfo CalleeBFI = nullptr,
bool  UpdateProfile = true 
)
inlineexplicit

Definition at line 205 of file Cloning.h.

Member Function Documentation

◆ reset()

void llvm::InlineFunctionInfo::reset ( )
inline

Definition at line 238 of file Cloning.h.

References InlinedCalls, InlinedCallSites, and StaticAllocas.

Referenced by llvm::InlineFunction().

Member Data Documentation

◆ CalleeBFI

BlockFrequencyInfo * llvm::InlineFunctionInfo::CalleeBFI

Definition at line 217 of file Cloning.h.

Referenced by llvm::InlineFunction().

◆ CallerBFI

BlockFrequencyInfo* llvm::InlineFunctionInfo::CallerBFI

Definition at line 217 of file Cloning.h.

Referenced by llvm::InlineFunction().

◆ GetAssumptionCache

function_ref<AssumptionCache &(Function &)> llvm::InlineFunctionInfo::GetAssumptionCache

If non-null, InlineFunction will update the callgraph to reflect the changes it makes.

Definition at line 215 of file Cloning.h.

Referenced by AddAlignmentAssumptions(), HandleByValArgument(), and llvm::InlineFunction().

◆ InlinedCalls

SmallVector<WeakTrackingVH, 8> llvm::InlineFunctionInfo::InlinedCalls

InlineFunction fills this in with callsites that were inlined from the callee.

This is only filled in if CG is non-null.

Definition at line 225 of file Cloning.h.

Referenced by reset().

◆ InlinedCallSites

SmallVector<CallBase *, 8> llvm::InlineFunctionInfo::InlinedCallSites

All of the new call sites inlined into the caller.

'InlineFunction' fills this in by scanning the inlined instructions, and only if CG is null. If CG is non-null, instead the value handle InlinedCalls above is used.

Definition at line 232 of file Cloning.h.

Referenced by llvm::InlineFunction(), and reset().

◆ PSI

ProfileSummaryInfo* llvm::InlineFunctionInfo::PSI

Definition at line 216 of file Cloning.h.

Referenced by llvm::InlineFunction().

◆ StaticAllocas

SmallVector<AllocaInst *, 4> llvm::InlineFunctionInfo::StaticAllocas

InlineFunction fills this in with all static allocas that get copied into the caller.

Definition at line 221 of file Cloning.h.

Referenced by HandleByValArgument(), llvm::InlineFunction(), InsertSafepointPoll(), and reset().

◆ UpdateProfile

bool llvm::InlineFunctionInfo::UpdateProfile

Update profile for callee as well as cloned version.

We need to do this for regular inlining, but not for inlining from sample profile loader.

Definition at line 236 of file Cloning.h.

Referenced by llvm::InlineFunction().


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