LLVM 22.0.0git
AssumeBundleQueries.h File Reference

Go to the source code of this file.

Classes

struct  llvm::DenseMapInfo< Attribute::AttrKind >
struct  llvm::MinMax
struct  llvm::RetainedKnowledge
 Represent one information held inside an operand bundle of an llvm.assume. More...

Namespaces

namespace  llvm
 This is an optimization pass for GlobalISel generic memory operations.

Typedefs

using llvm::RetainedKnowledgeKey = std::pair<Value *, Attribute::AttrKind>
 The map Key contains the Value on for which the attribute is valid and the Attribute that is valid for that value.
using llvm::Assume2KnowledgeMap = DenseMap<AssumeInst *, MinMax>
 A mapping from intrinsics (=llvm.assume calls) to a value range (=knowledge) that is encoded in them.
using llvm::RetainedKnowledgeMap

Enumerations

enum  llvm::AssumeBundleArg { llvm::ABA_WasOn = 0 , llvm::ABA_Argument = 1 }
 Index of elements in the operand bundle. More...

Functions

LLVM_ABI bool llvm::hasAttributeInAssume (AssumeInst &Assume, Value *IsOn, StringRef AttrName, uint64_t *ArgVal=nullptr)
 Query the operand bundle of an llvm.assume to find a single attribute of the specified kind applied on a specified Value.
bool llvm::hasAttributeInAssume (AssumeInst &Assume, Value *IsOn, Attribute::AttrKind Kind, uint64_t *ArgVal=nullptr)
LLVM_ABI void llvm::fillMapFromAssume (AssumeInst &Assume, RetainedKnowledgeMap &Result)
 Insert into the map all the informations contained in the operand bundles of the llvm.assume.
LLVM_ABI RetainedKnowledge llvm::getKnowledgeFromOperandInAssume (AssumeInst &Assume, unsigned Idx)
 Retreive the information help by Assume on the operand at index Idx.
RetainedKnowledge llvm::getKnowledgeFromUseInAssume (const Use *U)
 Retreive the information help by the Use U of an llvm.assume.
LLVM_ABI bool llvm::isAssumeWithEmptyBundle (const AssumeInst &Assume)
 Return true iff the operand bundles of the provided llvm.assume doesn't contain any valuable information.
LLVM_ABI RetainedKnowledge llvm::getKnowledgeFromUse (const Use *U, ArrayRef< Attribute::AttrKind > AttrKinds)
 Return a valid Knowledge associated to the Use U if its Attribute kind is in AttrKinds.
LLVM_ABI RetainedKnowledge llvm::getKnowledgeForValue (const Value *V, ArrayRef< Attribute::AttrKind > AttrKinds, AssumptionCache &AC, function_ref< bool(RetainedKnowledge, Instruction *, const CallBase::BundleOpInfo *)> Filter=[](auto...) { return true;})
 Return a valid Knowledge associated to the Value V if its Attribute kind is in AttrKinds and it matches the Filter.
LLVM_ABI RetainedKnowledge llvm::getKnowledgeValidInContext (const Value *V, ArrayRef< Attribute::AttrKind > AttrKinds, AssumptionCache &AC, const Instruction *CtxI, const DominatorTree *DT=nullptr)
 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.
LLVM_ABI RetainedKnowledge llvm::getKnowledgeFromBundle (AssumeInst &Assume, const CallBase::BundleOpInfo &BOI)
 This extracts the Knowledge from an element of an operand bundle.

Variables

constexpr StringRef llvm::IgnoreBundleTag = "ignore"
 Tag in operand bundle indicating that this bundle should be ignored.