LLVM 17.0.0git
Public Member Functions | Public Attributes | List of all members
llvm::InstrInfoQuery Struct Reference

InstrInfoQuery provides an interface to query additional information for instructions like metadata or keywords like nsw, which provides conservative results if the users specified it is safe to use. More...

#include "llvm/Analysis/InstructionSimplify.h"

Collaboration diagram for llvm::InstrInfoQuery:
Collaboration graph
[legend]

Public Member Functions

 InstrInfoQuery (bool UMD)
 
 InstrInfoQuery ()=default
 
MDNodegetMetadata (const Instruction *I, unsigned KindID) const
 
template<class InstT >
bool hasNoUnsignedWrap (const InstT *Op) const
 
template<class InstT >
bool hasNoSignedWrap (const InstT *Op) const
 
bool isExact (const BinaryOperator *Op) const
 

Public Attributes

bool UseInstrInfo = true
 

Detailed Description

InstrInfoQuery provides an interface to query additional information for instructions like metadata or keywords like nsw, which provides conservative results if the users specified it is safe to use.

Definition at line 63 of file InstructionSimplify.h.

Constructor & Destructor Documentation

◆ InstrInfoQuery() [1/2]

llvm::InstrInfoQuery::InstrInfoQuery ( bool  UMD)
inline

Definition at line 64 of file InstructionSimplify.h.

◆ InstrInfoQuery() [2/2]

llvm::InstrInfoQuery::InstrInfoQuery ( )
default

Member Function Documentation

◆ getMetadata()

MDNode * llvm::InstrInfoQuery::getMetadata ( const Instruction I,
unsigned  KindID 
) const
inline

Definition at line 68 of file InstructionSimplify.h.

References I, and UseInstrInfo.

Referenced by llvm::computeConstantRange(), and simplifyICmpInst().

◆ hasNoSignedWrap()

template<class InstT >
bool llvm::InstrInfoQuery::hasNoSignedWrap ( const InstT *  Op) const
inline

◆ hasNoUnsignedWrap()

template<class InstT >
bool llvm::InstrInfoQuery::hasNoUnsignedWrap ( const InstT *  Op) const
inline

◆ isExact()

bool llvm::InstrInfoQuery::isExact ( const BinaryOperator Op) const
inline

Member Data Documentation

◆ UseInstrInfo

bool llvm::InstrInfoQuery::UseInstrInfo = true

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