LLVM 22.0.0git
llvm::RetainedKnowledge Struct Reference

Represent one information held inside an operand bundle of an llvm.assume. More...

#include "llvm/Analysis/AssumeBundleQueries.h"

Public Member Functions

 RetainedKnowledge (Attribute::AttrKind AttrKind=Attribute::None, uint64_t ArgValue=0, Value *WasOn=nullptr)
bool operator== (RetainedKnowledge Other) const
bool operator!= (RetainedKnowledge Other) const
bool operator< (RetainedKnowledge Other) const
 This is only intended for use in std::min/stdmax between attribute that only differ in ArgValue.
 operator bool () const

Static Public Member Functions

static RetainedKnowledge none ()

Public Attributes

Attribute::AttrKind AttrKind = Attribute::None
uint64_t ArgValue = 0
ValueIRArgValue = nullptr
ValueWasOn = nullptr

Detailed Description

Represent one information held inside an operand bundle of an llvm.assume.

AttrKind is the property that holds. WasOn if not null is that Value for which AttrKind holds. ArgValue is optionally an argument of the attribute. For example if we know that P has an alignment of at least four:

  • AttrKind will be Attribute::Alignment.
  • WasOn will be P.
  • ArgValue will be 4.

Definition at line 102 of file AssumeBundleQueries.h.

Constructor & Destructor Documentation

◆ RetainedKnowledge()

llvm::RetainedKnowledge::RetainedKnowledge ( Attribute::AttrKind AttrKind = Attribute::None,
uint64_t ArgValue = 0,
Value * WasOn = nullptr )
inline

Definition at line 107 of file AssumeBundleQueries.h.

References ArgValue, AttrKind, llvm::Attribute::None, and WasOn.

Referenced by none(), operator!=(), operator<(), and operator==().

Member Function Documentation

◆ none()

RetainedKnowledge llvm::RetainedKnowledge::none ( )
inlinestatic

◆ operator bool()

llvm::RetainedKnowledge::operator bool ( ) const
inline

Definition at line 124 of file AssumeBundleQueries.h.

References AttrKind, and llvm::Attribute::None.

◆ operator!=()

bool llvm::RetainedKnowledge::operator!= ( RetainedKnowledge Other) const
inline

Definition at line 114 of file AssumeBundleQueries.h.

References llvm::Other, and RetainedKnowledge().

◆ operator<()

bool llvm::RetainedKnowledge::operator< ( RetainedKnowledge Other) const
inline

This is only intended for use in std::min/stdmax between attribute that only differ in ArgValue.

Definition at line 117 of file AssumeBundleQueries.h.

References ArgValue, assert(), AttrKind, llvm::Attribute::None, llvm::Other, RetainedKnowledge(), and WasOn.

◆ operator==()

bool llvm::RetainedKnowledge::operator== ( RetainedKnowledge Other) const
inline

Definition at line 110 of file AssumeBundleQueries.h.

References ArgValue, AttrKind, IRArgValue, llvm::Other, RetainedKnowledge(), and WasOn.

Member Data Documentation

◆ ArgValue

◆ AttrKind

◆ IRArgValue

◆ WasOn

Value* llvm::RetainedKnowledge::WasOn = nullptr

The documentation for this struct was generated from the following file: