class GlobalValueSummary

Declaration

class GlobalValueSummary { /* full declaration omitted */ };

Description

Function and variable summary information to aid decisions and implementation of importing.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:289

Member Variables

private llvm::GlobalValueSummary::SummaryKind Kind
Kind of summary for use in dyn_cast < > et al.
private llvm::GlobalValueSummary::GVFlags Flags
private GlobalValue::GUID OriginalName = 0
This is the hash of the name of the symbol in the original file. It is identical to the GUID for global symbols, but differs for local since the GUID includes the module level id in the hash.
private llvm::StringRef ModulePath
This is only used during parsing of the combined index, or when parsing the per-module index for creation of the combined summary index, not during writing of the per-module index which doesn't contain a module path string table.
private std::vector<ValueInfo> RefEdgeList
List of values referenced by this global value's definition (either by the initializer of a global variable, or referenced from within a function). This does not include functions called, which are listed in the derived FunctionSummary object.

Method Overview

Methods

GlobalValueSummary(
    llvm::GlobalValueSummary::SummaryKind K,
    llvm::GlobalValueSummary::GVFlags Flags,
    std::vector<ValueInfo> Refs)

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:371

Parameters

llvm::GlobalValueSummary::SummaryKind K
llvm::GlobalValueSummary::GVFlags Flags
std::vector<ValueInfo> Refs

bool canAutoHide() const

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:424

llvm::GlobalValueSummary::GVFlags flags() const

Description

Get the flags for this GlobalValue (see \p struct GVFlags).

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:398

const llvm::GlobalValueSummary* getBaseObject()
    const

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:442

llvm::GlobalValueSummary* getBaseObject()

Description

If this is an alias summary, returns the summary of the aliased object (a global variable or function), otherwise returns itself.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:441

GlobalValue::GUID getOriginalName() const

Description

Returns the hash of the original name, it is identical to the GUID for externally visible symbols, but not for local ones.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:382

llvm::GlobalValueSummary::SummaryKind
getSummaryKind() const

Description

Which kind of summary subclass this is.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:388

GlobalValue::VisibilityTypes getVisibility() const

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:426

bool isDSOLocal() const

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:420

bool isLive() const

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:414

GlobalValue::LinkageTypes linkage() const

Description

Return linkage type recorded for this global value.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:401

llvm::StringRef modulePath() const

Description

Get the path to the module containing this function.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:395

bool notEligibleToImport() const

Description

Return true if this global value can't be imported.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:412

ArrayRef<llvm::ValueInfo> refs() const

Description

Return the list of values referenced by this global value definition.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:437

void setCanAutoHide(bool CanAutoHide)

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:422

Parameters

bool CanAutoHide

void setDSOLocal(bool Local)

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:418

Parameters

bool Local

void setLinkage(GlobalValue::LinkageTypes Linkage)

Description

Sets the linkage to the value determined by global summary-based optimization. Will be applied in the ThinLTO backends.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:407

Parameters

GlobalValue::LinkageTypes Linkage

void setLive(bool Live)

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:416

Parameters

bool Live

void setModulePath(llvm::StringRef ModPath)

Description

Set the path to the module containing this function, for use in the combined index.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:392

Parameters

llvm::StringRef ModPath

void setNotEligibleToImport()

Description

Flag that this global value cannot be imported.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:434

void setOriginalName(GlobalValue::GUID Name)

Description

Initialize the original name hash in this summary.

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:385

Parameters

GlobalValue::GUID Name

void setVisibility(
    GlobalValue::VisibilityTypes Vis)

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:429

Parameters

GlobalValue::VisibilityTypes Vis

virtual ~GlobalValueSummary()

Declared at: llvm/include/llvm/IR/ModuleSummaryIndex.h:378