class GlobalVarSummary

Declaration

class GlobalVarSummary : public GlobalValueSummary { /* full declaration omitted */ };

Description

Global variable summary information to aid decisions and implementation of importing. Global variable summary has two extra flag, telling if it is readonly or writeonly. Both readonly and writeonly variables can be optimized in the backed: readonly variables can be const-folded, while writeonly vars can be completely eliminated together with corresponding stores. We let both things happen by means of internalizing such variables after ThinLTO import.

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

Inherits from: GlobalValueSummary

Member Variables

private std::unique_ptr<VTableFuncList> VTableFuncs
For vtable definitions this holds the list of functions and their corresponding offsets within the initializer array.
public struct GVarFlags VarFlags

Method Overview

Inherited from GlobalValueSummary:

Methods

GlobalVarSummary(
    llvm::GlobalValueSummary::GVFlags Flags,
    llvm::GlobalVarSummary::GVarFlags VarFlags,
    std::vector<ValueInfo> Refs)

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

Parameters

llvm::GlobalValueSummary::GVFlags Flags
llvm::GlobalVarSummary::GVarFlags VarFlags
std::vector<ValueInfo> Refs

static bool classof(
    const llvm::GlobalValueSummary* GVS)

Description

Check if this is a global variable summary.

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

Parameters

const llvm::GlobalValueSummary* GVS

GlobalObject::VCallVisibility getVCallVisibility()
    const

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

bool isConstant() const

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

bool maybeReadOnly() const

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

bool maybeWriteOnly() const

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

void setReadOnly(bool RO)

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

Parameters

bool RO

void setVCallVisibility(
    GlobalObject::VCallVisibility Vis)

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

Parameters

GlobalObject::VCallVisibility Vis

void setVTableFuncs(llvm::VTableFuncList Funcs)

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

Parameters

llvm::VTableFuncList Funcs

void setWriteOnly(bool WO)

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

Parameters

bool WO

ArrayRef<llvm::VirtFuncOffset> vTableFuncs() const

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

llvm::GlobalVarSummary::GVarFlags varflags() const

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