class GlobalsAAResult::FunctionInfo

Declaration

class GlobalsAAResult::FunctionInfo { /* full declaration omitted */ };

Description

The mod/ref information collected for a particular function. We collect information about mod/ref behavior of a function here, both in general and as pertains to specific globals. We only have this detailed information when we know *something* useful about the behavior. If we saturate to fully general mod/ref, we remove the info for the function.

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:64

Member Variables

private PointerIntPair< llvm::GlobalsAAResult::FunctionInfo:: AlignedMap*, 3, unsigned int, llvm::GlobalsAAResult::FunctionInfo:: AlignedMapPointerTraits> Info
All of the information is encoded into a single pointer, with a three bit integer in the low three bits. The high bit provides a flag for when this function may read any global. The low two bits are the ModRefInfo. And the pointer, when non-null, points to a map from GlobalValue to ModRefInfo specific to that GlobalValue.

Method Overview

Methods

FunctionInfo()

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:105

FunctionInfo(
    const llvm::GlobalsAAResult::FunctionInfo&
        Arg)

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:112

Parameters

const llvm::GlobalsAAResult::FunctionInfo& Arg

FunctionInfo(
    llvm::GlobalsAAResult::FunctionInfo&& Arg)

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:117

Parameters

llvm::GlobalsAAResult::FunctionInfo&& Arg

void addFunctionInfo(
    const llvm::GlobalsAAResult::FunctionInfo& FI)

Description

Add mod/ref info from another function into ours, saturating towards ModRef.

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:175

Parameters

const llvm::GlobalsAAResult::FunctionInfo& FI

void addModRefInfo(llvm::ModRefInfo NewMRI)

Description

Adds new \c ModRefInfo for this function to its state.

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:149

Parameters

llvm::ModRefInfo NewMRI

void addModRefInfoForGlobal(
    const llvm::GlobalValue& GV,
    llvm::ModRefInfo NewMRI)

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:186

Parameters

const llvm::GlobalValue& GV
llvm::ModRefInfo NewMRI

void eraseModRefInfoForGlobal(
    const llvm::GlobalValue& GV)

Description

Clear a global's ModRef info. Should be used when a global is being deleted.

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:198

Parameters

const llvm::GlobalValue& GV

llvm::ModRefInfo getModRefInfo() const

Description

Returns the \c ModRefInfo info for this function.

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:144

llvm::ModRefInfo getModRefInfoForGlobal(
    const llvm::GlobalValue& GV) const

Description

Returns the \c ModRefInfo info for this function w.r.t. a particular global, which may be more precise than the general information above.

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:162

Parameters

const llvm::GlobalValue& GV

llvm::ModRefInfo globalClearMayReadAnyGlobal(
    int I) const

Description

This method clears MayReadAnyGlobal bit added by GlobalsAAResult to return the corresponding ModRefInfo. It must align in functionality with clearMust().

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:138

Parameters

int I

bool mayReadAnyGlobal() const

Description

Returns whether this function may read any global variable, and we don't know which global.

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:155

void setMayReadAnyGlobal()

Description

Sets this function as potentially reading from any global.

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:158

~FunctionInfo()

Declared at: llvm/lib/Analysis/GlobalsModRef.cpp:106