class LoadInst

Declaration

class LoadInst : public UnaryInstruction { /* full declaration omitted */ };

Description

An instruction for reading from memory. This uses the SubclassData field in Value to store whether or not the load is volatile.

Declared at: llvm/include/llvm/IR/Instructions.h:174

Inherits from: UnaryInstruction

Member Variables

private SyncScope::ID SSID
The synchronization scope ID of this load instruction. Not quite enough room in SubClassData for everything, so synchronization scope ID gets its own field.

Inherited from Value:

protected SubclassOptionalData
protected NumUserOperands
protected IsUsedByMD
protected HasName
protected HasMetadata
protected HasHungOffUses
protected HasDescriptor
public static MaxAlignmentExponent = 32
public static MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

  • private void AssertOK()
  • public LoadInst(llvm::Type * Ty, llvm::Value * Ptr, const llvm::Twine & NameStr, llvm::Instruction * InsertBefore)
  • public LoadInst(llvm::Type * Ty, llvm::Value * Ptr, const llvm::Twine & NameStr, llvm::BasicBlock * InsertAtEnd)
  • public LoadInst(llvm::Type * Ty, llvm::Value * Ptr, const llvm::Twine & NameStr, bool isVolatile, llvm::Instruction * InsertBefore)
  • public LoadInst(llvm::Type * Ty, llvm::Value * Ptr, const llvm::Twine & NameStr, bool isVolatile, llvm::BasicBlock * InsertAtEnd)
  • public LoadInst(llvm::Type * Ty, llvm::Value * Ptr, const llvm::Twine & NameStr, bool isVolatile, llvm::Align Align, llvm::Instruction * InsertBefore = nullptr)
  • public LoadInst(llvm::Type * Ty, llvm::Value * Ptr, const llvm::Twine & NameStr, bool isVolatile, llvm::Align Align, llvm::BasicBlock * InsertAtEnd)
  • public LoadInst(llvm::Type * Ty, llvm::Value * Ptr, const llvm::Twine & NameStr, bool isVolatile, llvm::Align Align, llvm::AtomicOrdering Order, SyncScope::ID SSID = SyncScope::System, llvm::Instruction * InsertBefore = nullptr)
  • public LoadInst(llvm::Type * Ty, llvm::Value * Ptr, const llvm::Twine & NameStr, bool isVolatile, llvm::Align Align, llvm::AtomicOrdering Order, SyncScope::ID SSID, llvm::BasicBlock * InsertAtEnd)
  • public static bool classof(const llvm::Value * V)
  • public static bool classof(const llvm::Instruction * I)
  • protected llvm::LoadInst * cloneImpl() const
  • public llvm::Align getAlign() const
  • public llvm::AtomicOrdering getOrdering() const
  • public unsigned int getPointerAddressSpace() const
  • public llvm::Value * getPointerOperand()
  • public const llvm::Value * getPointerOperand() const
  • public static unsigned int getPointerOperandIndex()
  • public llvm::Type * getPointerOperandType() const
  • public SyncScope::ID getSyncScopeID() const
  • public bool isSimple() const
  • public bool isUnordered() const
  • public bool isVolatile() const
  • public void setAlignment(llvm::Align Align)
  • public void setAtomic(llvm::AtomicOrdering Ordering, SyncScope::ID SSID = SyncScope::System)
  • public void setOrdering(llvm::AtomicOrdering Ordering)
  • private template <typename Bitfield>void setSubclassData(typename Bitfield::Type Value)
  • public void setSyncScopeID(SyncScope::ID SSID)
  • public void setVolatile(bool V)

Inherited from UnaryInstruction:

Inherited from Instruction:

Inherited from User:

Inherited from Value:

Methods

void AssertOK()

Declared at: llvm/include/llvm/IR/Instructions.h:182

LoadInst(llvm::Type* Ty,
         llvm::Value* Ptr,
         const llvm::Twine& NameStr,
         llvm::Instruction* InsertBefore)

Declared at: llvm/include/llvm/IR/Instructions.h:191

Parameters

llvm::Type* Ty
llvm::Value* Ptr
const llvm::Twine& NameStr
llvm::Instruction* InsertBefore

LoadInst(llvm::Type* Ty,
         llvm::Value* Ptr,
         const llvm::Twine& NameStr,
         llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:193

Parameters

llvm::Type* Ty
llvm::Value* Ptr
const llvm::Twine& NameStr
llvm::BasicBlock* InsertAtEnd

LoadInst(llvm::Type* Ty,
         llvm::Value* Ptr,
         const llvm::Twine& NameStr,
         bool isVolatile,
         llvm::Instruction* InsertBefore)

Declared at: llvm/include/llvm/IR/Instructions.h:194

Parameters

llvm::Type* Ty
llvm::Value* Ptr
const llvm::Twine& NameStr
bool isVolatile
llvm::Instruction* InsertBefore

LoadInst(llvm::Type* Ty,
         llvm::Value* Ptr,
         const llvm::Twine& NameStr,
         bool isVolatile,
         llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:196

Parameters

llvm::Type* Ty
llvm::Value* Ptr
const llvm::Twine& NameStr
bool isVolatile
llvm::BasicBlock* InsertAtEnd

LoadInst(
    llvm::Type* Ty,
    llvm::Value* Ptr,
    const llvm::Twine& NameStr,
    bool isVolatile,
    llvm::Align Align,
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/Instructions.h:198

Parameters

llvm::Type* Ty
llvm::Value* Ptr
const llvm::Twine& NameStr
bool isVolatile
llvm::Align Align
llvm::Instruction* InsertBefore = nullptr

LoadInst(llvm::Type* Ty,
         llvm::Value* Ptr,
         const llvm::Twine& NameStr,
         bool isVolatile,
         llvm::Align Align,
         llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:200

Parameters

llvm::Type* Ty
llvm::Value* Ptr
const llvm::Twine& NameStr
bool isVolatile
llvm::Align Align
llvm::BasicBlock* InsertAtEnd

LoadInst(
    llvm::Type* Ty,
    llvm::Value* Ptr,
    const llvm::Twine& NameStr,
    bool isVolatile,
    llvm::Align Align,
    llvm::AtomicOrdering Order,
    SyncScope::ID SSID = SyncScope::System,
    llvm::Instruction* InsertBefore = nullptr)

Declared at: llvm/include/llvm/IR/Instructions.h:202

Parameters

llvm::Type* Ty
llvm::Value* Ptr
const llvm::Twine& NameStr
bool isVolatile
llvm::Align Align
llvm::AtomicOrdering Order
SyncScope::ID SSID = SyncScope::System
llvm::Instruction* InsertBefore = nullptr

LoadInst(llvm::Type* Ty,
         llvm::Value* Ptr,
         const llvm::Twine& NameStr,
         bool isVolatile,
         llvm::Align Align,
         llvm::AtomicOrdering Order,
         SyncScope::ID SSID,
         llvm::BasicBlock* InsertAtEnd)

Declared at: llvm/include/llvm/IR/Instructions.h:206

Parameters

llvm::Type* Ty
llvm::Value* Ptr
const llvm::Twine& NameStr
bool isVolatile
llvm::Align Align
llvm::AtomicOrdering Order
SyncScope::ID SSID
llvm::BasicBlock* InsertAtEnd

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

Declared at: llvm/include/llvm/IR/Instructions.h:275

Parameters

const llvm::Value* V

static bool classof(const llvm::Instruction* I)

Declared at: llvm/include/llvm/IR/Instructions.h:272

Parameters

const llvm::Instruction* I

llvm::LoadInst* cloneImpl() const

Declared at: llvm/include/llvm/IR/Instructions.h:188

llvm::Align getAlign() const

Description

Return the alignment of the access that is being performed.

Declared at: llvm/include/llvm/IR/Instructions.h:217

llvm::AtomicOrdering getOrdering() const

Description

Returns the ordering constraint of this load instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:226

unsigned int getPointerAddressSpace() const

Description

Returns the address space of the pointer operand.

Declared at: llvm/include/llvm/IR/Instructions.h:267

llvm::Value* getPointerOperand()

Declared at: llvm/include/llvm/IR/Instructions.h:261

const llvm::Value* getPointerOperand() const

Declared at: llvm/include/llvm/IR/Instructions.h:262

static unsigned int getPointerOperandIndex()

Declared at: llvm/include/llvm/IR/Instructions.h:263

llvm::Type* getPointerOperandType() const

Declared at: llvm/include/llvm/IR/Instructions.h:264

SyncScope::ID getSyncScopeID() const

Description

Returns the synchronization scope ID of this load instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:236

bool isSimple() const

Declared at: llvm/include/llvm/IR/Instructions.h:253

bool isUnordered() const

Declared at: llvm/include/llvm/IR/Instructions.h:255

bool isVolatile() const

Description

Return true if this is a load from a volatile memory location.

Declared at: llvm/include/llvm/IR/Instructions.h:211

void setAlignment(llvm::Align Align)

Declared at: llvm/include/llvm/IR/Instructions.h:221

Parameters

llvm::Align Align

void setAtomic(
    llvm::AtomicOrdering Ordering,
    SyncScope::ID SSID = SyncScope::System)

Description

Sets the ordering constraint and the synchronization scope ID of this load instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:247

Parameters

llvm::AtomicOrdering Ordering
SyncScope::ID SSID = SyncScope::System

void setOrdering(llvm::AtomicOrdering Ordering)

Description

Sets the ordering constraint of this load instruction. May not be Release or AcquireRelease.

Declared at: llvm/include/llvm/IR/Instructions.h:231

Parameters

llvm::AtomicOrdering Ordering

template <typename Bitfield>
void setSubclassData(
    typename Bitfield::Type Value)

Declared at: llvm/include/llvm/IR/Instructions.h:283

Templates

Bitfield

Parameters

typename Bitfield::Type Value

void setSyncScopeID(SyncScope::ID SSID)

Description

Sets the synchronization scope ID of this load instruction.

Declared at: llvm/include/llvm/IR/Instructions.h:241

Parameters

SyncScope::ID SSID

void setVolatile(bool V)

Description

Specify whether this is a volatile load or not.

Declared at: llvm/include/llvm/IR/Instructions.h:214

Parameters

bool V