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:752

Inherits from: GlobalValueSummary

Member Variables

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:770

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:776

Parameters

const llvm::GlobalValueSummary* GVS

bool maybeReadOnly() const

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

bool maybeWriteOnly() const

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

void setReadOnly(bool RO)

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

Parameters

bool RO

void setVTableFuncs(llvm::VTableFuncList Funcs)

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

Parameters

llvm::VTableFuncList Funcs

void setWriteOnly(bool WO)

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

Parameters

bool WO

ArrayRef<llvm::VirtFuncOffset> vTableFuncs() const

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

llvm::GlobalVarSummary::GVarFlags varflags() const

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