LLVM 19.0.0git
Classes | Namespaces | Typedefs | Enumerations | Functions | Variables
AssumeBundleQueries.h File Reference
#include "llvm/ADT/DenseMap.h"
#include "llvm/IR/IntrinsicInst.h"

Go to the source code of this file.


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


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


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 = DenseMap< RetainedKnowledgeKey, Assume2KnowledgeMap >


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


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)
void llvm::fillMapFromAssume (AssumeInst &Assume, RetainedKnowledgeMap &Result)
 Insert into the map all the informations contained in the operand bundles of the llvm.assume.
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.
bool llvm::isAssumeWithEmptyBundle (const AssumeInst &Assume)
 Return true iff the operand bundles of the provided llvm.assume doesn't contain any valuable information.
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.
RetainedKnowledge llvm::getKnowledgeForValue (const Value *V, ArrayRef< Attribute::AttrKind > AttrKinds, AssumptionCache *AC=nullptr, 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.
RetainedKnowledge llvm::getKnowledgeValidInContext (const Value *V, ArrayRef< Attribute::AttrKind > AttrKinds, const Instruction *CtxI, const DominatorTree *DT=nullptr, AssumptionCache *AC=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.
RetainedKnowledge llvm::getKnowledgeFromBundle (AssumeInst &Assume, const CallBase::BundleOpInfo &BOI)
 This extracts the Knowledge from an element of an operand bundle.


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