class Value

Declaration

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

Description

LLVM Value Representation This is a very important LLVM class. It is the base class of all values computed by a program that may be used as operands to other values. Value is the super class of other important classes such as Instruction and Function. All Values have a Type. Type is not a subclass of Value. Some values can have a name and they belong to some Module. Setting the name on the Value automatically updates the module's symbol table. Every value has a "use list" that keeps track of which other Values are using this Value. A Value can also have an arbitrary number of ValueHandle objects that watch it and listen to RAUW and Destroy events. See llvm/IR/ValueHandle.h for details.

Declared at: llvm/include/llvm/IR/Value.h:74

Member Variables

private llvm::Type* VTy
private llvm::Use* UseList
private const unsigned char SubclassID
private unsigned char HasValueHandle
protected unsigned char SubclassOptionalData
This member is similar to SubclassData, however it is for holding information which may be used to aid optimization, but which may be cleared to zero without affecting conservative interpretation.
private unsigned short SubclassData
This member is defined by this class, but is not used for anything. Subclasses can use it to hold whatever state they find useful. This field is initialized to zero by the ctor.
protected unsigned int NumUserOperands
protected unsigned int IsUsedByMD
protected unsigned int HasName
protected unsigned int HasMetadata
protected unsigned int HasHungOffUses
protected unsigned int HasDescriptor
public static const unsigned int MaxAlignmentExponent = 32
This is the greatest alignment value supported by load, store, and alloca instructions, and global values.
public static const uint64_t MaximumAlignment = 1ULL << MaxAlignmentExponent

Method Overview

Methods

llvm::Value* DoPHITranslation(
    const llvm::BasicBlock* CurBB,
    const llvm::BasicBlock* PredBB)

Declared at: llvm/include/llvm/IR/Value.h:783

Parameters

const llvm::BasicBlock* CurBB
const llvm::BasicBlock* PredBB

const llvm::Value* DoPHITranslation(
    const llvm::BasicBlock* CurBB,
    const llvm::BasicBlock* PredBB) const

Description

Translate PHI node to its predecessor from the given basic block. If this value is a PHI node with CurBB as its parent, return the value in the PHI node corresponding to PredBB. If not, return ourself. This is useful if you want to know the value something has in a predecessor block.

Declared at: llvm/include/llvm/IR/Value.h:781

Parameters

const llvm::BasicBlock* CurBB
const llvm::BasicBlock* PredBB

Value(llvm::Type* Ty, unsigned int scid)

Declared at: llvm/include/llvm/IR/Value.h:215

Parameters

llvm::Type* Ty
unsigned int scid

Value(const llvm::Value&)

Declared at: llvm/include/llvm/IR/Value.h:225

Parameters

const llvm::Value&

void addMetadata(unsigned int KindID,
                 llvm::MDNode& MD)

Description

Add a metadata attachment. @ {

Declared at: llvm/include/llvm/IR/Value.h:611

Parameters

unsigned int KindID
llvm::MDNode& MD

void addMetadata(llvm::StringRef Kind,
                 llvm::MDNode& MD)

Declared at: llvm/include/llvm/IR/Value.h:612

Parameters

llvm::StringRef Kind
llvm::MDNode& MD

void addUse(llvm::Use& U)

Description

This method should only be used by the Use class.

Declared at: llvm/include/llvm/IR/Value.h:505

Parameters

llvm::Use& U

void assertModuleIsMaterialized() const

Declared at: llvm/include/llvm/IR/Value.h:338

void assertModuleIsMaterializedImpl() const

Declared at: llvm/include/llvm/IR/Value.h:334

bool canBeFreed() const

Description

Return true if the memory object referred to by V can by freed in the scope for which the SSA value defining the allocation is statically defined. E.g. deallocation after the static scope of a value does not count, but a deallocation before that does.

Declared at: llvm/include/llvm/IR/Value.h:754

void clearMetadata()

Description

Erase all metadata attached to this Value.

Declared at: llvm/include/llvm/IR/Value.h:621

void clearSubclassOptionalData()

Description

Clear the optional flags contained in this value.

Declared at: llvm/include/llvm/IR/Value.h:544

void deleteValue()

Description

Delete a pointer to a generic Value.

Declared at: llvm/include/llvm/IR/Value.h:229

void destroyValueName()

Declared at: llvm/include/llvm/IR/Value.h:266

void doRAUW(llvm::Value* New,
            llvm::Value::ReplaceMetadataUses)

Declared at: llvm/include/llvm/IR/Value.h:268

Parameters

llvm::Value* New
llvm::Value::ReplaceMetadataUses

static void dropDroppableUse(llvm::Use& U)

Description

Remove the droppable use \p U.

Declared at: llvm/include/llvm/IR/Value.h:493

Parameters

llvm::Use& U

void dropDroppableUses(
    llvm::function_ref<bool(const Use*)>
        ShouldDrop =
            [](const llvm::Use*) { return true; })

Description

Remove every uses that can safely be removed. This will remove for example uses in llvm.assume. This should be used when performing want to perform a tranformation but some Droppable uses pervent it. This function optionally takes a filter to only remove some droppable uses.

Declared at: llvm/include/llvm/IR/Value.h:486

Parameters

llvm::function_ref<bool(const Use*)> ShouldDrop = [](const llvm::Use *) { return true; }

void dropDroppableUsesIn(llvm::User& Usr)

Description

Remove every use of this value in \p User that can safely be removed.

Declared at: llvm/include/llvm/IR/Value.h:490

Parameters

llvm::User& Usr

void dump() const

Description

Support for debugging, callable in GDB: V->dump()

Declared at: llvm/include/llvm/IR/Value.h:232

bool eraseMetadata(unsigned int KindID)

Description

Erase all metadata attachments with the given kind.

Declared at: llvm/include/llvm/IR/Value.h:618

Parameters

unsigned int KindID

Returns

true if any metadata was removed.

void getAllMetadata(
    SmallVectorImpl<
        std::pair<unsigned int, MDNode*>>& MDs)
    const

Description

Appends all metadata attached to this value to \c MDs, sorting by KindID. The first element of each pair returned is the KindID, the second element is the metadata value. Attachments with the same ID appear in insertion order.

Declared at: llvm/include/llvm/IR/Value.h:585

Parameters

SmallVectorImpl<std::pair<unsigned int, MDNode*>>& MDs

llvm::LLVMContext& getContext() const

Description

All values hold a context through their type.

Declared at: llvm/include/llvm/IR/Value.h:258

void getMetadata(
    llvm::StringRef Kind,
    SmallVectorImpl<llvm::MDNode*>& MDs) const

Declared at: llvm/include/llvm/IR/Value.h:577

Parameters

llvm::StringRef Kind
SmallVectorImpl<llvm::MDNode*>& MDs

void getMetadata(
    unsigned int KindID,
    SmallVectorImpl<llvm::MDNode*>& MDs) const

Description

Appends all attachments with the given ID to \c MDs in insertion order. If the Value has no attachments with the given ID, or if ID is invalid, leaves MDs unchanged. @ {

Declared at: llvm/include/llvm/IR/Value.h:576

Parameters

unsigned int KindID
SmallVectorImpl<llvm::MDNode*>& MDs

llvm::MDNode* getMetadata(
    llvm::StringRef Kind) const

Declared at: llvm/include/llvm/IR/Value.h:569

Parameters

llvm::StringRef Kind

llvm::MDNode* getMetadata(
    unsigned int KindID) const

Description

Get the current metadata attachments for the given kind, if any. These functions require that the value have at most a single attachment of the given kind, and return \c nullptr if such an attachment is missing. @ {

Declared at: llvm/include/llvm/IR/Value.h:568

Parameters

unsigned int KindID

llvm::StringRef getName() const

Description

Return a constant reference to the value's name. This guaranteed to return the same reference as long as the value is not modified. If the value has a name, this does a hashtable lookup, so it's not free.

Declared at: llvm/include/llvm/IR/Value.h:277

std::string getNameOrAsOperand() const

Declared at: llvm/include/llvm/IR/Value.h:294

unsigned int getNumUses() const

Description

This method computes the number of uses of this Value. This is a linear time operation. Use hasOneUse, hasNUses, or hasNUsesOrMore to check for specific values.

Declared at: llvm/include/llvm/IR/Value.h:502

llvm::Align getPointerAlignment(
    const llvm::DataLayout& DL) const

Description

Returns an alignment of the pointer value. Returns an alignment which is either specified explicitly, e.g. via align attribute of a function argument, or guaranteed by DataLayout.

Declared at: llvm/include/llvm/IR/Value.h:773

Parameters

const llvm::DataLayout& DL

uint64_t getPointerDereferenceableBytes(
    const llvm::DataLayout& DL,
    bool& CanBeNull,
    bool& CanBeFreed) const

Description

Returns the number of bytes known to be dereferenceable for the pointer value. If CanBeNull is set by this function the pointer can either be null or be dereferenceable up to the returned number of bytes. IF CanBeFreed is true, the pointer is known to be dereferenceable at point of definition only. Caller must prove that allocation is not deallocated between point of definition and use.

Declared at: llvm/include/llvm/IR/Value.h:765

Parameters

const llvm::DataLayout& DL
bool& CanBeNull
bool& CanBeFreed

unsigned int getRawSubclassOptionalData() const

Description

Return the raw optional flags value contained in this value. This should only be used when testing two Values for equivalence.

Declared at: llvm/include/llvm/IR/Value.h:539

const llvm::Use* getSingleUndroppableUse() const

Declared at: llvm/include/llvm/IR/Value.h:457

llvm::Use* getSingleUndroppableUse()

Description

Return true if there is exactly one use of this value that cannot be dropped.

Declared at: llvm/include/llvm/IR/Value.h:456

unsigned short getSubclassDataFromValue() const

Declared at: llvm/include/llvm/IR/Value.h:852

llvm::Type* getType() const

Description

All values are typed, get the type of this value.

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

const llvm::User* getUniqueUndroppableUser() const

Declared at: llvm/include/llvm/IR/Value.h:464

llvm::User* getUniqueUndroppableUser()

Description

Return true if there is exactly one unique user of this value that cannot be dropped (that user can have multiple uses of this value).

Declared at: llvm/include/llvm/IR/Value.h:463

unsigned int getValueID() const

Description

Return an ID for the concrete type of this object. This is used to implement the classof checks. This should not be used for any other purpose, as the values may change as LLVM evolves. Also, note that for instructions, the Instruction's opcode is added to InstructionVal. So this means three things: # there is no value with code InstructionVal (no opcode==0). # there are more possible values for the value type than in ValueTy enum. # the InstructionVal enumerator must be the highest valued enumerator in the ValueTy enum.

Declared at: llvm/include/llvm/IR/Value.h:532

llvm::ValueName* getValueName() const

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

bool hasMetadata(unsigned int KindID) const

Description

Return true if this value has the given type of metadata attached. @ {

Declared at: llvm/include/llvm/IR/Value.h:592

Parameters

unsigned int KindID

bool hasMetadata(llvm::StringRef Kind) const

Declared at: llvm/include/llvm/IR/Value.h:595

Parameters

llvm::StringRef Kind

bool hasMetadata() const

Description

Return true if this value has any metadata attached to it.

Declared at: llvm/include/llvm/IR/Value.h:588

bool hasNUndroppableUses(unsigned int N) const

Description

Return true if there this value. This is specialized because it is a common request and does not require traversing the whole use list.

Declared at: llvm/include/llvm/IR/Value.h:472

Parameters

unsigned int N

bool hasNUndroppableUsesOrMore(
    unsigned int N) const

Description

Return true if this value has N uses or more. This is logically equivalent to getNumUses() >= N.

Declared at: llvm/include/llvm/IR/Value.h:477

Parameters

unsigned int N

bool hasNUses(unsigned int N) const

Description

Return true if this Value has exactly N uses.

Declared at: llvm/include/llvm/IR/Value.h:437

Parameters

unsigned int N

bool hasNUsesOrMore(unsigned int N) const

Description

Return true if this value has N uses or more. This is logically equivalent to getNumUses() >= N.

Declared at: llvm/include/llvm/IR/Value.h:442

Parameters

unsigned int N

bool hasName() const

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

bool hasOneUse() const

Description

Return true if there is exactly one use of this value. This is specialized because it is a common request and does not require traversing the whole use list.

Declared at: llvm/include/llvm/IR/Value.h:434

bool hasOneUser() const

Description

Return true if there is exactly one user of this value. Note that this is not the same as "has one use". If a value has one use, then there certainly is a single user. But if value has several uses, it is possible that all uses are in a single user, or not. This check is potentially costly, since it requires traversing, in the worst case, the whole use list of a value.

Declared at: llvm/include/llvm/IR/Value.h:452

bool hasSameSubclassOptionalData(
    const llvm::Value* V) const

Description

Check the optional flags for equality.

Declared at: llvm/include/llvm/IR/Value.h:549

Parameters

const llvm::Value* V

bool hasValueHandle() const

Description

Return true if there is a value handle associated with this value.

Declared at: llvm/include/llvm/IR/Value.h:554

bool isSwiftError() const

Description

Return true if this value is a swifterror value. swifterror values can be either a function argument or an alloca with a swifterror attribute.

Declared at: llvm/include/llvm/IR/Value.h:628

bool isTransitiveUsedByMetadataOnly() const

Declared at: llvm/include/llvm/IR/Value.h:560

bool isUsedByMetadata() const

Description

Return true if there is metadata referencing this value.

Declared at: llvm/include/llvm/IR/Value.h:557

bool isUsedInBasicBlock(
    const llvm::BasicBlock* BB) const

Description

Check if this value is used in the specified basic block.

Declared at: llvm/include/llvm/IR/Value.h:496

Parameters

const llvm::BasicBlock* BB

llvm::Value::const_use_iterator
materialized_use_begin() const

Declared at: llvm/include/llvm/IR/Value.h:357

llvm::Value::use_iterator materialized_use_begin()

Declared at: llvm/include/llvm/IR/Value.h:356

bool materialized_use_empty() const

Declared at: llvm/include/llvm/IR/Value.h:349

llvm::Value::user_iterator
materialized_user_begin()

Declared at: llvm/include/llvm/IR/Value.h:393

llvm::Value::const_user_iterator
materialized_user_begin() const

Declared at: llvm/include/llvm/IR/Value.h:394

iterator_range<llvm::Value::const_user_iterator>
materialized_users() const

Declared at: llvm/include/llvm/IR/Value.h:418

iterator_range<llvm::Value::user_iterator>
materialized_users()

Declared at: llvm/include/llvm/IR/Value.h:415

iterator_range<llvm::Value::use_iterator>
materialized_uses()

Declared at: llvm/include/llvm/IR/Value.h:370

iterator_range<llvm::Value::const_use_iterator>
materialized_uses() const

Declared at: llvm/include/llvm/IR/Value.h:373

template <class Compare>
static llvm::Use* mergeUseLists(llvm::Use* L,
                                llvm::Use* R,
                                Compare Cmp)

Description

Merge two lists together. Merges \c L and \c R using \c Cmp. To enable stable sorts, always pushes "equal" items from L before items from R.

Declared at: llvm/include/llvm/IR/Value.h:824

Templates

Compare

Parameters

llvm::Use* L
llvm::Use* R
Compare Cmp

Returns

the first element in the list.

void mutateType(llvm::Type* Ty)

Description

Mutate the type of this Value to be of the specified type. Note that this is an extremely dangerous operation which can create completely invalid IR very easily. It is strongly recommended that you recreate IR objects with the right types instead of mutating them in place.

Declared at: llvm/include/llvm/IR/Value.h:801

Parameters

llvm::Type* Ty

void print(llvm::raw_ostream& O,
           llvm::ModuleSlotTracker& MST,
           bool IsForDebug = false) const

Declared at: llvm/include/llvm/IR/Value.h:237

Parameters

llvm::raw_ostream& O
llvm::ModuleSlotTracker& MST
bool IsForDebug = false

void print(llvm::raw_ostream& O,
           bool IsForDebug = false) const

Description

Implement operator < < on Value. @ {

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

Parameters

llvm::raw_ostream& O
bool IsForDebug = false

void printAsOperand(
    llvm::raw_ostream& O,
    bool PrintType = true,
    const llvm::Module* M = nullptr) const

Description

Print the name of this Value out to the specified raw_ostream. This is useful when you just want to print 'int %reg126', not the instruction that generated it. If you specify a Module for context, then even constanst get pretty-printed; for example, the type of a null pointer is printed symbolically. @ {

Declared at: llvm/include/llvm/IR/Value.h:248

Parameters

llvm::raw_ostream& O
bool PrintType = true
const llvm::Module* M = nullptr

void printAsOperand(
    llvm::raw_ostream& O,
    bool PrintType,
    llvm::ModuleSlotTracker& MST) const

Declared at: llvm/include/llvm/IR/Value.h:250

Parameters

llvm::raw_ostream& O
bool PrintType
llvm::ModuleSlotTracker& MST

void replaceAllUsesWith(llvm::Value* V)

Description

Change all uses of this to point to a new Value. Go through the uses list for this definition and make each use point to "V" instead of "this". After this completes, 'this's use list is guaranteed to be empty.

Declared at: llvm/include/llvm/IR/Value.h:302

Parameters

llvm::Value* V

void replaceNonMetadataUsesWith(llvm::Value* V)

Description

Change non-metadata uses of this to point to a new Value. Go through the uses list for this definition and make each use point to "V" instead of "this". This function skips metadata entries in the list.

Declared at: llvm/include/llvm/IR/Value.h:308

Parameters

llvm::Value* V

void replaceUsesOutsideBlock(llvm::Value* V,
                             llvm::BasicBlock* BB)

Description

replaceUsesOutsideBlock - Go through the uses list for this definition and make each use point to "V" instead of "this" when the use is outside the block. 'This's use list is expected to have at least one element. Unlike replaceAllUsesWith() this function does not support basic block values.

Declared at: llvm/include/llvm/IR/Value.h:322

Parameters

llvm::Value* V
llvm::BasicBlock* BB

void replaceUsesWithIf(
    llvm::Value* New,
    llvm::function_ref<bool(Use&)> ShouldReplace)

Description

Go through the uses list for this definition and make each use point to "V" if the callback ShouldReplace returns true for the given Use. Unlike replaceAllUsesWith() this function does not support basic block values.

Declared at: llvm/include/llvm/IR/Value.h:314

Parameters

llvm::Value* New
llvm::function_ref<bool(Use&)> ShouldReplace

void reverseUseList()

Description

Reverse the use-list.

Declared at: llvm/include/llvm/IR/Value.h:812

void setMetadata(llvm::StringRef Kind,
                 llvm::MDNode* Node)

Declared at: llvm/include/llvm/IR/Value.h:606

Parameters

llvm::StringRef Kind
llvm::MDNode* Node

void setMetadata(unsigned int KindID,
                 llvm::MDNode* Node)

Description

Set a particular kind of metadata attachment. Sets the given attachment to \c MD, erasing it if \c MD is \c nullptr or replacing it if it already exists. @ {

Declared at: llvm/include/llvm/IR/Value.h:605

Parameters

unsigned int KindID
llvm::MDNode* Node

void setName(const llvm::Twine& Name)

Description

Change the name of the value. Choose a new unique name if the provided name is taken.

Declared at: llvm/include/llvm/IR/Value.h:284

Parameters

const llvm::Twine& Name
The new name; or "" if the value's name should be removed.

void setNameImpl(const llvm::Twine& Name)

Declared at: llvm/include/llvm/IR/Value.h:269

Parameters

const llvm::Twine& Name

void setValueName(llvm::ValueName* VN)

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

Parameters

llvm::ValueName* VN

void setValueSubclassData(unsigned short D)

Declared at: llvm/include/llvm/IR/Value.h:853

Parameters

unsigned short D

template <class Compare>
void sortUseList(Compare Cmp)

Description

Sort the use-list. Sorts the Value's use-list by Cmp using a stable mergesort. Cmp is expected to compare two \a Use references.

Declared at: llvm/include/llvm/IR/Value.h:809

Templates

Compare

Parameters

Compare Cmp

llvm::Value* stripAndAccumulateConstantOffsets(
    const llvm::DataLayout& DL,
    llvm::APInt& Offset,
    bool AllowNonInbounds,
    bool AllowInvariantGroup = false)

Declared at: llvm/include/llvm/IR/Value.h:717

Parameters

const llvm::DataLayout& DL
llvm::APInt& Offset
bool AllowNonInbounds
bool AllowInvariantGroup = false

const llvm::Value*
stripAndAccumulateConstantOffsets(
    const llvm::DataLayout& DL,
    llvm::APInt& Offset,
    bool AllowNonInbounds,
    bool AllowInvariantGroup = false,
    function_ref<bool(llvm::Value&, llvm::APInt&)>
        ExternalAnalysis = nullptr) const

Description

Accumulate the constant offset this value has compared to a base pointer. Only 'getelementptr' instructions (GEPs) are accumulated but other instructions, e.g., casts, are stripped away as well. The accumulated constant offset is added to \p Offset and the base pointer is returned. The APInt \p Offset has to have a bit-width equal to the IntPtr type for the address space of 'this' pointer value, e.g., use DataLayout::getIndexTypeSizeInBits(Ty). If \p AllowNonInbounds is true, offsets in GEPs are stripped and accumulated even if the GEP is not "inbounds". If \p AllowInvariantGroup is true then this method also looks through strip.invariant.group and launder.invariant.group intrinsics. If \p ExternalAnalysis is provided it will be used to calculate a offset when a operand of GEP is not constant. For example, for a value \p ExternalAnalysis might try to calculate a lower bound. If \p ExternalAnalysis is successful, it should return true. If this is called on a non-pointer value, it returns 'this' and the\p Offset is not modified. Note that this function will never return a nullptr. It will also never manipulate the \p Offset in a way that would not match the difference between the underlying value and the returned one. Thus, if no constant offset was found, the returned value is the underlying one and \p Offset is unchanged.

Declared at: llvm/include/llvm/IR/Value.h:712

Parameters

const llvm::DataLayout& DL
llvm::APInt& Offset
bool AllowNonInbounds
bool AllowInvariantGroup = false
function_ref<bool(llvm::Value&, llvm::APInt&)> ExternalAnalysis = nullptr

llvm::Value*
stripAndAccumulateInBoundsConstantOffsets(
    const llvm::DataLayout& DL,
    llvm::APInt& Offset)

Declared at: llvm/include/llvm/IR/Value.h:732

Parameters

const llvm::DataLayout& DL
llvm::APInt& Offset

const llvm::Value*
stripAndAccumulateInBoundsConstantOffsets(
    const llvm::DataLayout& DL,
    llvm::APInt& Offset) const

Description

This is a wrapper around stripAndAccumulateConstantOffsets with the in-bounds requirement set to false.

Declared at: llvm/include/llvm/IR/Value.h:727

Parameters

const llvm::DataLayout& DL
llvm::APInt& Offset

llvm::Value* stripInBoundsConstantOffsets()

Declared at: llvm/include/llvm/IR/Value.h:678

const llvm::Value* stripInBoundsConstantOffsets()
    const

Description

Strip off pointer casts and all-constant inbounds GEPs. Returns the original pointer value. If this is called on a non-pointer value, it returns 'this'.

Declared at: llvm/include/llvm/IR/Value.h:677

const llvm::Value* stripInBoundsOffsets(
    function_ref<void(const llvm::Value*)> Func =
        [](const llvm::Value*) {}) const

Description

Strip off pointer casts and inbounds GEPs. Returns the original pointer value. If this is called on a non-pointer value, it returns 'this'.

Declared at: llvm/include/llvm/IR/Value.h:742

Parameters

function_ref<void(const llvm::Value*)> Func = [](const llvm::Value *) { }

inline llvm::Value* stripInBoundsOffsets(
    function_ref<void(const llvm::Value*)> Func =
        [](const llvm::Value*) {})

Declared at: llvm/include/llvm/IR/Value.h:744

Parameters

function_ref<void(const llvm::Value*)> Func = [](const llvm::Value *) { }

const llvm::Value* stripPointerCasts() const

Description

Strip off pointer casts, all-zero GEPs and address space casts. Returns the original uncasted value. If this is called on a non-pointer value, it returns 'this'.

Declared at: llvm/include/llvm/IR/Value.h:634

llvm::Value* stripPointerCasts()

Declared at: llvm/include/llvm/IR/Value.h:635

const llvm::Value* stripPointerCastsAndAliases()
    const

Description

Strip off pointer casts, all-zero GEPs, address space casts, and aliases. Returns the original uncasted value. If this is called on a non-pointer value, it returns 'this'.

Declared at: llvm/include/llvm/IR/Value.h:644

llvm::Value* stripPointerCastsAndAliases()

Declared at: llvm/include/llvm/IR/Value.h:645

const llvm::Value*
stripPointerCastsForAliasAnalysis() const

Description

Strip off pointer casts, all-zero GEPs, single-argument phi nodes and invariant group info. Returns the original uncasted value. If this is called on a non-pointer value, it returns 'this'. This function should be used only in Alias analysis.

Declared at: llvm/include/llvm/IR/Value.h:667

llvm::Value* stripPointerCastsForAliasAnalysis()

Declared at: llvm/include/llvm/IR/Value.h:668

llvm::Value* stripPointerCastsSameRepresentation()

Declared at: llvm/include/llvm/IR/Value.h:656

const llvm::Value*
stripPointerCastsSameRepresentation() const

Description

Strip off pointer casts, all-zero GEPs and address space casts but ensures the representation of the result stays the same. Returns the original uncasted value with the same representation. If this is called on a non-pointer value, it returns 'this'.

Declared at: llvm/include/llvm/IR/Value.h:655

void takeName(llvm::Value* V)

Description

Transfer the name from V to this value. After taking V's name, sets V's name to empty.

Declared at: llvm/include/llvm/IR/Value.h:291

Parameters

llvm::Value* V

llvm::Value::const_use_iterator use_begin() const

Declared at: llvm/include/llvm/IR/Value.h:364

llvm::Value::use_iterator use_begin()

Declared at: llvm/include/llvm/IR/Value.h:360

bool use_empty() const

Declared at: llvm/include/llvm/IR/Value.h:344

llvm::Value::const_use_iterator use_end() const

Declared at: llvm/include/llvm/IR/Value.h:369

llvm::Value::use_iterator use_end()

Declared at: llvm/include/llvm/IR/Value.h:368

llvm::User* user_back()

Declared at: llvm/include/llvm/IR/Value.h:407

const llvm::User* user_back() const

Declared at: llvm/include/llvm/IR/Value.h:411

llvm::Value::const_user_iterator user_begin()
    const

Declared at: llvm/include/llvm/IR/Value.h:401

llvm::Value::user_iterator user_begin()

Declared at: llvm/include/llvm/IR/Value.h:397

bool user_empty() const

Declared at: llvm/include/llvm/IR/Value.h:385

llvm::Value::user_iterator user_end()

Declared at: llvm/include/llvm/IR/Value.h:405

llvm::Value::const_user_iterator user_end() const

Declared at: llvm/include/llvm/IR/Value.h:406

iterator_range<llvm::Value::user_iterator> users()

Declared at: llvm/include/llvm/IR/Value.h:421

iterator_range<llvm::Value::const_user_iterator>
users() const

Declared at: llvm/include/llvm/IR/Value.h:425

iterator_range<llvm::Value::use_iterator> uses()

Declared at: llvm/include/llvm/IR/Value.h:376

iterator_range<llvm::Value::const_use_iterator>
uses() const

Declared at: llvm/include/llvm/IR/Value.h:380

~Value()

Description

Value's destructor should be virtual by design, but that would require that Value and all of its subclasses have a vtable that effectively duplicates the information in the value ID. As a size optimization, the destructor has been protected, and the caller should manually call deleteValue.

Declared at: llvm/include/llvm/IR/Value.h:222