LLVM  6.0.0svn
Public Member Functions | Public Attributes | List of all members
llvm::GlobalValueSummary::GVFlags Struct Reference

Group flags (Linkage, NotEligibleToImport, etc.) as a bitfield. More...

#include "llvm/IR/ModuleSummaryIndex.h"

Collaboration diagram for llvm::GlobalValueSummary::GVFlags:
Collaboration graph
[legend]

Public Member Functions

 GVFlags (GlobalValue::LinkageTypes Linkage, bool NotEligibleToImport, bool Live, bool IsLocal)
 Convenience Constructors. More...
 

Public Attributes

unsigned Linkage: 4
 The linkage type of the associated global value. More...
 
unsigned NotEligibleToImport: 1
 Indicate if the global value cannot be imported (e.g. More...
 
unsigned Live: 1
 In per-module summary, indicate that the global value must be considered a live root for index-based liveness analysis. More...
 
unsigned DSOLocal: 1
 Indicates that the linker resolved the symbol to a definition from within the same linkage unit. More...
 

Detailed Description

Group flags (Linkage, NotEligibleToImport, etc.) as a bitfield.

Definition at line 130 of file ModuleSummaryIndex.h.

Constructor & Destructor Documentation

◆ GVFlags()

llvm::GlobalValueSummary::GVFlags::GVFlags ( GlobalValue::LinkageTypes  Linkage,
bool  NotEligibleToImport,
bool  Live,
bool  IsLocal 
)
inlineexplicit

Convenience Constructors.

Definition at line 156 of file ModuleSummaryIndex.h.

References isLive(), Kind, and Live.

Member Data Documentation

◆ DSOLocal

unsigned llvm::GlobalValueSummary::GVFlags::DSOLocal

Indicates that the linker resolved the symbol to a definition from within the same linkage unit.

Definition at line 153 of file ModuleSummaryIndex.h.

Referenced by getEncodedGVSummaryFlags(), llvm::GlobalValueSummary::isDSOLocal(), and llvm::GlobalValueSummary::setDSOLocal().

◆ Linkage

unsigned llvm::GlobalValueSummary::GVFlags::Linkage

The linkage type of the associated global value.

One use is to flag values that have local linkage types and need to have module identifier appended before placing into the combined index, to disambiguate from other values with the same name. In the future this will be used to update and optimize linkage types based on global summary-based analysis.

Definition at line 138 of file ModuleSummaryIndex.h.

Referenced by getEncodedGVSummaryFlags(), llvm::GlobalValueSummary::linkage(), and llvm::GlobalValueSummary::setLinkage().

◆ Live

unsigned llvm::GlobalValueSummary::GVFlags::Live

In per-module summary, indicate that the global value must be considered a live root for index-based liveness analysis.

Used for special LLVM values such as llvm.global_ctors that the linker does not know about.

In combined summary, indicate that the global value is live.

Definition at line 149 of file ModuleSummaryIndex.h.

Referenced by getEncodedGVSummaryFlags(), GVFlags(), and llvm::GlobalValueSummary::setLive().

◆ NotEligibleToImport

unsigned llvm::GlobalValueSummary::GVFlags::NotEligibleToImport

Indicate if the global value cannot be imported (e.g.

it cannot be renamed or references something that can't be renamed).

Definition at line 142 of file ModuleSummaryIndex.h.

Referenced by getEncodedGVSummaryFlags(), llvm::GlobalValueSummary::notEligibleToImport(), and llvm::GlobalValueSummary::setNotEligibleToImport().


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