One piece of knowledge from an llvm.assume operand bundle.

Synopsis

Declared in <llvm/Analysis/AssumeBundleQueries.h>

struct RetainedKnowledge;

Description

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.

Member Functions

Name

Description

RetainedKnowledge [constructor]

Construct retained knowledge for an attribute and optional value.

operator bool

Return true if this knowledge is non‐empty.

operator==

Return true if this knowledge equals Other.

operator!=

Return true if this knowledge differs from Other.

operator<

Compare by ArgValue among otherwise equal attributes.

Static Member Functions

Name

Description

none

Return an empty RetainedKnowledge.

Data Members

Name

Description

ArgValue

Optional numeric argument for the attribute (e.g. alignment).

AttrKind

Attribute kind that is known to hold.

IRArgValue

Optional IR value argument associated with the attribute.

WasOn

Value to which the attribute applies, or nullptr if none.

Non-Member Functions

Name

Description

getKnowledgeForValue

Return a valid Knowledge associated to the Value V if its Attribute kind is in AttrKinds and it matches the Filter.

getKnowledgeFromBundle

This extracts the Knowledge from an element of an operand bundle. This is mostly for use in the assume builder.

getKnowledgeFromUse

Return a valid Knowledge associated to the Use U if its Attribute kind is in AttrKinds.

getKnowledgeValidInContext

Return a valid Knowledge associated to the Value V if its Attribute kind is in AttrKinds and the knowledge is suitable to be used in the context of CtxI.

Created with MrDocs