class SlotTracker

Declaration

class SlotTracker { /* full declaration omitted */ };

Description

This class provides computation of slot numbers for LLVM Assembly writing.

Declared at: llvm/lib/IR/AsmWriter.cpp:673

Method Overview

Methods

SlotTracker(
    const llvm::Function* F,
    bool ShouldInitializeAllMetadata = false)

Description

Construct from a function, starting out in incorp state. If \c ShouldInitializeAllMetadata, initializes all metadata in all functions, giving correct numbering for metadata referenced only from within a function (even if no functions have been initialized).

Declared at: llvm/lib/IR/AsmWriter.cpp:732

Parameters

const llvm::Function* F
bool ShouldInitializeAllMetadata = false

SlotTracker(const llvm::ModuleSummaryIndex* Index)

Description

Construct from a module summary index.

Declared at: llvm/lib/IR/AsmWriter.cpp:736

Parameters

const llvm::ModuleSummaryIndex* Index

SlotTracker(const llvm::SlotTracker&)

Declared at: llvm/lib/IR/AsmWriter.cpp:738

Parameters

const llvm::SlotTracker&

SlotTracker(
    const llvm::Module* M,
    bool ShouldInitializeAllMetadata = false)

Description

Construct from a module. If \c ShouldInitializeAllMetadata, initializes all metadata in all functions, giving correct numbering for metadata referenced only from within a function (even if no functions have been initialized).

Declared at: llvm/lib/IR/AsmWriter.cpp:724

Parameters

const llvm::Module* M
bool ShouldInitializeAllMetadata = false

llvm::SlotTracker::as_iterator as_begin()

Declared at: llvm/lib/IR/AsmWriter.cpp:776

bool as_empty() const

Declared at: llvm/lib/IR/AsmWriter.cpp:779

llvm::SlotTracker::as_iterator as_end()

Declared at: llvm/lib/IR/AsmWriter.cpp:777

unsigned int as_size() const

Declared at: llvm/lib/IR/AsmWriter.cpp:778

int getAttributeGroupSlot(llvm::AttributeSet AS)

Declared at: llvm/lib/IR/AsmWriter.cpp:746

Parameters

llvm::AttributeSet AS

const llvm::Function* getFunction() const

Declared at: llvm/lib/IR/AsmWriter.cpp:758

int getGUIDSlot(GlobalValue::GUID GUID)

Declared at: llvm/lib/IR/AsmWriter.cpp:748

Parameters

GlobalValue::GUID GUID

int getGlobalSlot(const llvm::GlobalValue* V)

Description

getGlobalSlot - Get the slot number of a global value.

Declared at: llvm/lib/IR/AsmWriter.cpp:744

Parameters

const llvm::GlobalValue* V

int getLocalSlot(const llvm::Value* V)

Description

Return the slot number of the specified value in it's type plane. If something is not in the SlotTracker, return -1.

Declared at: llvm/lib/IR/AsmWriter.cpp:743

Parameters

const llvm::Value* V

int getMetadataSlot(const llvm::MDNode* N)

Description

getMetadataSlot - Get the slot number of a MDNode.

Declared at: llvm/lib/IR/AsmWriter.cpp:745

Parameters

const llvm::MDNode* N

int getModulePathSlot(llvm::StringRef Path)

Declared at: llvm/lib/IR/AsmWriter.cpp:747

Parameters

llvm::StringRef Path

int getTypeIdSlot(llvm::StringRef Id)

Declared at: llvm/lib/IR/AsmWriter.cpp:749

Parameters

llvm::StringRef Id

void incorporateFunction(const llvm::Function* F)

Description

If you'd like to deal with a function instead of just a module, use this method to get its data into the SlotTracker.

Declared at: llvm/lib/IR/AsmWriter.cpp:753

Parameters

const llvm::Function* F

inline void initializeIfNeeded()

Description

These functions do the actual initialization.

Declared at: llvm/lib/IR/AsmWriter.cpp:785

void initializeIndexIfNeeded()

Declared at: llvm/lib/IR/AsmWriter.cpp:786

llvm::SlotTracker::mdn_iterator mdn_begin()

Declared at: llvm/lib/IR/AsmWriter.cpp:768

bool mdn_empty() const

Declared at: llvm/lib/IR/AsmWriter.cpp:771

llvm::SlotTracker::mdn_iterator mdn_end()

Declared at: llvm/lib/IR/AsmWriter.cpp:769

unsigned int mdn_size() const

Declared at: llvm/lib/IR/AsmWriter.cpp:770

void purgeFunction()

Description

After calling incorporateFunction, use this method to remove the most recently incorporated function from the SlotTracker. This will reset the state of the machine back to just the module contents.

Declared at: llvm/lib/IR/AsmWriter.cpp:763