llvm::updateProfileCallee

Update callee profile counts after cloning or inlining.

Synopsis

Declared in <llvm/Transforms/Utils/Cloning.h>

void
updateProfileCallee(
    Function* Callee,
    int64_t EntryDelta,
    ValueMap<Value const*, WeakTrackingVH> const* VMap = nullptr);

Description

Updates profile information by adjusting the entry count by adding EntryDelta then scaling callsite information by the new count divided by the old count. VMap is used during inlinng to also update the new clone.

Parameters

NameDescription
CalleeFunction whose profile data should be updated.
EntryDeltaSigned delta added to the callee's entry count.
VMapOptional mapping used during inlining to update the cloned callee as well.