class MemoryUseOrDef

Declaration

class MemoryUseOrDef : public MemoryAccess { /* full declaration omitted */ };

Description

Class that has the common methods + fields of memory uses/defs. It's a little awkward to have, but there are many cases where we want either a use or def, and there are many cases where uses are needed (defs aren't acceptable), and vice-versa. This class should never be instantiated directly; make a MemoryUse or MemoryDef instead.

Declared at: llvm/include/llvm/Analysis/MemorySSA.h:248

Inherits from: MemoryAccess

Member Variables

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 29
public static MaximumAlignment = 1U << MaxAlignmentExponent

Method Overview

Inherited from MemoryAccess:

Inherited from DerivedUser:

    Inherited from User:

    Inherited from Value:

    Methods

    MemoryUseOrDef(
        llvm::LLVMContext& C,
        llvm::MemoryAccess* DMA,
        unsigned int Vty,
        llvm::DerivedUser::DeleteValueTy DeleteValue,
        llvm::Instruction* MI,
        llvm::BasicBlock* BB,
        unsigned int NumOperands)

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:285

    Parameters

    llvm::LLVMContext& C
    llvm::MemoryAccess* DMA
    unsigned int Vty
    llvm::DerivedUser::DeleteValueTy DeleteValue
    llvm::Instruction* MI
    llvm::BasicBlock* BB
    unsigned int NumOperands

    static bool classof(const llvm::Value* MA)

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:260

    Parameters

    const llvm::Value* MA

    llvm::MemoryAccess* getDefiningAccess() const

    Description

    Get the access that produces the memory state used by this Use.

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:258

    llvm::Instruction* getMemoryInst() const

    Description

    Get the instruction that this MemoryUse represents.

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:255

    inline llvm::MemoryAccess* getOptimized() const

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:267

    Optional<llvm::AliasResult>
    getOptimizedAccessType() const

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:272

    inline bool isOptimized() const

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:266

    inline void resetOptimized()

    Description

    Reset the ID of what this MemoryUse was optimized to, causing it to be rewalked by the walker if necessary. This really should only be called by tests.

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:279

    void setDefiningAccess(
        llvm::MemoryAccess* DMA,
        bool Optimized = false,
        Optional<llvm::AliasResult> AR = MayAlias)

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:300

    Parameters

    llvm::MemoryAccess* DMA
    bool Optimized = false
    Optional<llvm::AliasResult> AR = MayAlias

    inline void setOptimized(llvm::MemoryAccess*)

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:268

    Parameters

    llvm::MemoryAccess*

    void setOptimizedAccessType(
        Optional<llvm::AliasResult> AR)

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:296

    Parameters

    Optional<llvm::AliasResult> AR

    ~MemoryUseOrDef()

    Declared at: llvm/include/llvm/Analysis/MemorySSA.h:294