LLVM 20.0.0git
|
#include "llvm/Analysis/SimplifyQuery.h"
Public Member Functions | |
SimplifyQuery (const DataLayout &DL, const Instruction *CXTI=nullptr) | |
SimplifyQuery (const DataLayout &DL, const TargetLibraryInfo *TLI, const DominatorTree *DT=nullptr, AssumptionCache *AC=nullptr, const Instruction *CXTI=nullptr, bool UseInstrInfo=true, bool CanUseUndef=true, const DomConditionCache *DC=nullptr) | |
SimplifyQuery (const DataLayout &DL, const DominatorTree *DT, AssumptionCache *AC=nullptr, const Instruction *CXTI=nullptr, bool UseInstrInfo=true, bool CanUseUndef=true) | |
SimplifyQuery | getWithInstruction (const Instruction *I) const |
SimplifyQuery | getWithoutUndef () const |
bool | isUndefValue (Value *V) const |
If CanUseUndef is true, returns whether V is undef. | |
SimplifyQuery | getWithoutDomCondCache () const |
SimplifyQuery | getWithCondContext (const CondContext &CC) const |
SimplifyQuery | getWithoutCondContext () const |
Public Attributes | |
const DataLayout & | DL |
const TargetLibraryInfo * | TLI = nullptr |
const DominatorTree * | DT = nullptr |
AssumptionCache * | AC = nullptr |
const Instruction * | CxtI = nullptr |
const DomConditionCache * | DC = nullptr |
const CondContext * | CC = nullptr |
const InstrInfoQuery | IIQ |
bool | CanUseUndef = true |
Controls whether simplifications are allowed to constrain the range of possible values for uses of undef. | |
Definition at line 70 of file SimplifyQuery.h.
|
inline |
Definition at line 89 of file SimplifyQuery.h.
|
inline |
Definition at line 92 of file SimplifyQuery.h.
|
inline |
Definition at line 100 of file SimplifyQuery.h.
|
inline |
Definition at line 128 of file SimplifyQuery.h.
References CC.
|
inline |
Definition at line 107 of file SimplifyQuery.h.
References I.
Referenced by llvm::GCNTTIImpl::canSimplifyLegacyMulToMul(), llvm::InstCombiner::computeKnownBits(), computeKnownFPClass(), llvm::InstCombiner::computeOverflowForSignedAdd(), llvm::InstCombiner::computeOverflowForSignedMul(), llvm::InstCombiner::computeOverflowForSignedSub(), llvm::InstCombiner::computeOverflowForUnsignedAdd(), llvm::InstCombiner::computeOverflowForUnsignedMul(), llvm::InstCombiner::computeOverflowForUnsignedSub(), llvm::InstCombinerImpl::foldAddWithConstant(), foldCtpop(), foldCttzCtlz(), foldFCmpFSubIntoFCmp(), foldFPtoI(), llvm::InstCombinerImpl::foldICmpAddConstant(), foldICmpAndXX(), llvm::InstCombinerImpl::foldICmpBinOp(), llvm::InstCombinerImpl::foldICmpBinOpEqualityWithConstant(), llvm::InstCombinerImpl::foldICmpCommutative(), llvm::InstCombinerImpl::foldICmpIntrinsicWithConstant(), llvm::InstCombinerImpl::foldICmpUsingKnownBits(), llvm::InstCombinerImpl::foldICmpWithMinMax(), llvm::InstCombinerImpl::foldICmpWithZero(), foldSelectBinOpIdentity(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), llvm::InstCombinerImpl::foldSignBitTest(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), llvm::InstCombiner::MaskedValueIsZero(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), simplifyAndOrWithOpReplaced(), llvm::InstCombinerImpl::SimplifyAssociativeOrCommutative(), llvm::InstCombiner::SimplifyDemandedBits(), llvm::InstCombinerImpl::SimplifyDemandedInstructionBits(), simplifyInstructionWithOperands(), simplifyInstructionWithPHI(), simplifyLoopInst(), llvm::InstCombinerImpl::SimplifySelectsFeedingBinaryOp(), threadBinOpOverPHI(), threadCmpOverPHI(), tryFactorization(), llvm::InstCombinerImpl::visitAdd(), llvm::InstCombinerImpl::visitAnd(), llvm::InstCombinerImpl::visitAShr(), llvm::InstCombinerImpl::visitBitCast(), llvm::InstCombinerImpl::visitCallInst(), llvm::InstCombinerImpl::visitExtractElementInst(), llvm::InstCombinerImpl::visitExtractValueInst(), llvm::InstCombinerImpl::visitFAdd(), llvm::InstCombinerImpl::visitFCmpInst(), llvm::InstCombinerImpl::visitFDiv(), llvm::InstCombinerImpl::visitFMul(), llvm::InstCombinerImpl::visitFreeze(), llvm::InstCombinerImpl::visitFRem(), llvm::InstCombinerImpl::visitGEPOfGEP(), llvm::InstCombinerImpl::visitGetElementPtrInst(), llvm::InstCombinerImpl::visitICmpInst(), llvm::InstCombinerImpl::visitInsertElementInst(), llvm::InstCombinerImpl::visitInsertValueInst(), llvm::InstCombinerImpl::visitLoadInst(), llvm::InstCombinerImpl::visitLShr(), llvm::InstCombinerImpl::visitMul(), llvm::InstCombinerImpl::visitOr(), llvm::InstCombinerImpl::visitPHINode(), llvm::InstCombinerImpl::visitPtrToInt(), llvm::InstCombinerImpl::visitSDiv(), llvm::InstCombinerImpl::visitSExt(), llvm::InstCombinerImpl::visitShl(), llvm::InstCombinerImpl::visitShuffleVectorInst(), llvm::InstCombinerImpl::visitSRem(), llvm::InstCombinerImpl::visitSub(), llvm::InstCombinerImpl::visitUDiv(), llvm::InstCombinerImpl::visitURem(), llvm::InstCombinerImpl::visitXor(), and llvm::InstCombinerImpl::visitZExt().
|
inline |
Definition at line 134 of file SimplifyQuery.h.
Referenced by computeKnownBitsFromOperator(), computeKnownFPClass(), ComputeNumSignBitsImpl(), isKnownNonZeroFromOperator(), isKnownToBeAPowerOfTwo(), and isNonEqualPHIs().
|
inline |
Definition at line 122 of file SimplifyQuery.h.
Referenced by llvm::InstCombinerImpl::foldICmpUsingKnownBits(), and llvm::InstCombinerImpl::visitSub().
|
inline |
Definition at line 112 of file SimplifyQuery.h.
Referenced by expandBinOp(), llvm::InstCombinerImpl::foldUsingDistributiveLaws(), simplifyAndOrWithICmpEq(), llvm::simplifyBinaryIntrinsic(), simplifySelectWithICmpEq(), and llvm::simplifyWithOpReplaced().
If CanUseUndef is true, returns whether V
is undef.
Otherwise always return false.
Definition at line 7333 of file InstructionSimplify.cpp.
References CanUseUndef, llvm::PatternMatch::m_Undef(), and llvm::PatternMatch::match().
Referenced by llvm::GCNTTIImpl::instCombineIntrinsic(), isPoisonShift(), simplifyAddInst(), simplifyAndInst(), llvm::simplifyBinaryIntrinsic(), simplifyDivRem(), simplifyExtractElementInst(), simplifyFCmpInst(), simplifyFPOp(), simplifyGEPInst(), simplifyICmpInst(), llvm::simplifyInsertElementInst(), simplifyInsertValueInst(), simplifyIntrinsic(), simplifyLdexp(), simplifyMulInst(), simplifyOrInst(), simplifyPHINode(), simplifyRightShift(), simplifySelectInst(), simplifyShlInst(), simplifyShuffleVectorInst(), simplifySubInst(), simplifyXorInst(), and threadBinOpOverSelect().
AssumptionCache* llvm::SimplifyQuery::AC = nullptr |
Definition at line 74 of file SimplifyQuery.h.
Referenced by llvm::adjustKnownBitsForSelectArm(), llvm::computeKnownBitsFromContext(), computeKnownBitsFromOperator(), computeKnownBitsMul(), computeKnownFPClass(), computeKnownFPClassFromContext(), llvm::computeOverflowForSignedSub(), llvm::computeOverflowForUnsignedSub(), foldAndOrOfICmpsWithPow2AndWithZero(), foldCtpopPow2Test(), haveNoCommonBitsSetSpecialCases(), isKnownNonZeroFromAssume(), isKnownNonZeroFromOperator(), isMaskOrZero(), setShiftFlags(), simplifyAndCommutative(), simplifyAndInst(), simplifyAShrInst(), simplifyFreezeInst(), simplifyICmpInst(), simplifyICmpWithDominatingAssume(), and simplifyUnaryIntrinsic().
Controls whether simplifications are allowed to constrain the range of possible values for uses of undef.
If it is false, simplifications are not allowed to assume a particular value for a use of undef for example.
Definition at line 87 of file SimplifyQuery.h.
Referenced by isUndefValue(), and simplifyWithOpReplaced().
const CondContext* llvm::SimplifyQuery::CC = nullptr |
Definition at line 77 of file SimplifyQuery.h.
Referenced by llvm::computeKnownBitsFromContext(), and getWithCondContext().
const Instruction* llvm::SimplifyQuery::CxtI = nullptr |
Definition at line 75 of file SimplifyQuery.h.
Referenced by llvm::adjustKnownBitsForSelectArm(), llvm::computeKnownBitsFromContext(), computeKnownBitsFromOperator(), computeKnownBitsMul(), computeKnownFPClass(), computeKnownFPClassFromContext(), ComputeNumSignBitsImpl(), llvm::computeOverflowForSignedSub(), llvm::computeOverflowForUnsignedSub(), foldAndOrOfICmpsWithPow2AndWithZero(), foldCtpopPow2Test(), foldOrCommuteConstant(), getKnownSign(), getKnownSignOrZero(), haveNoCommonBitsSetSpecialCases(), isKnownNonZero(), isKnownNonZeroFromAssume(), isKnownNonZeroFromOperator(), isKnownToBeAPowerOfTwo(), isMaskOrZero(), isNonEqualPHIs(), isPowerOfTwoRecurrence(), setShiftFlags(), simplifyAndCommutative(), simplifyAndInst(), simplifyAShrInst(), simplifyByDomEq(), llvm::InstCombinerImpl::SimplifyDemandedUseBits(), simplifyFCmpInst(), simplifyFreezeInst(), simplifyICmpInst(), simplifyICmpWithDominatingAssume(), simplifyInstructionWithOperands(), simplifySelectInst(), simplifySelectWithFCmp(), and simplifyUnaryIntrinsic().
const DomConditionCache* llvm::SimplifyQuery::DC = nullptr |
Definition at line 76 of file SimplifyQuery.h.
Referenced by llvm::computeKnownBitsFromContext(), and computeKnownFPClassFromContext().
const DataLayout& llvm::SimplifyQuery::DL |
Definition at line 71 of file SimplifyQuery.h.
Referenced by computeKnownBits(), llvm::computeKnownBits(), computeKnownBitsForHorizontalOperation(), computeKnownBitsFromCmp(), computeKnownBitsFromOperator(), ComputeNumSignBitsImpl(), llvm::computeOverflowForUnsignedSub(), computePointerICmp(), dropRedundantMaskingOfLeftShiftInput(), foldAndOrOfICmpsWithPow2AndWithZero(), foldConstant(), foldCtpopPow2Test(), foldOrCommuteConstant(), foldShiftIntoShiftInAnotherHandOfAndInICmp(), getKnownSign(), getKnownSignOrZero(), isGEPKnownNonNull(), isKnownNonEqual(), isKnownNonZeroFromOperator(), isMaskOrZero(), isNonEqualPointersWithRecursiveGEP(), llvm::InstCombinerImpl::reassociateShiftAmtsOfTwoSameDirectionShifts(), setShiftFlags(), simplifyAndCommutative(), simplifyAndInst(), simplifyAndOrOfCmps(), simplifyAShrInst(), llvm::simplifyBinaryIntrinsic(), simplifyByDomEq(), simplifyCastInst(), simplifyFCmpInst(), simplifyGEPInst(), simplifyICmpInst(), simplifyICmpOfBools(), simplifyICmpWithDominatingAssume(), simplifyInstructionWithOperands(), llvm::simplifyLoadInst(), simplifyOrInst(), simplifySelectInst(), simplifySubInst(), simplifyUnaryIntrinsic(), and simplifyWithOpReplaced().
const DominatorTree* llvm::SimplifyQuery::DT = nullptr |
Definition at line 73 of file SimplifyQuery.h.
Referenced by llvm::adjustKnownBitsForSelectArm(), llvm::computeKnownBitsFromContext(), computeKnownBitsFromOperator(), computeKnownBitsMul(), computeKnownFPClass(), computeKnownFPClassFromContext(), llvm::computeOverflowForSignedSub(), llvm::computeOverflowForUnsignedSub(), foldAndOrOfICmpsWithPow2AndWithZero(), foldCtpopPow2Test(), haveNoCommonBitsSetSpecialCases(), isKnownNonZero(), isKnownNonZeroFromAssume(), isKnownNonZeroFromOperator(), isMaskOrZero(), runImpl(), setShiftFlags(), simplifyAndCommutative(), simplifyAndInst(), simplifyAShrInst(), simplifyFreezeInst(), simplifyICmpInst(), simplifyICmpWithDominatingAssume(), simplifyPHINode(), simplifyUnaryIntrinsic(), threadBinOpOverPHI(), and threadCmpOverPHI().
const InstrInfoQuery llvm::SimplifyQuery::IIQ |
Definition at line 82 of file SimplifyQuery.h.
Referenced by llvm::computeConstantRangeIncludingKnownBits(), computeKnownBitsFromOperator(), computeKnownFPClass(), isKnownNonZeroFromOperator(), isKnownToBeAPowerOfTwo(), isPowerOfTwoRecurrence(), simplifyAndInst(), simplifyAndOfICmps(), simplifyAShrInst(), simplifyDivRem(), simplifyICmpInst(), simplifyICmpWithBinOp(), simplifyInstructionWithOperands(), simplifyLShrInst(), simplifyMulInst(), simplifyOrOfICmps(), simplifyRem(), and simplifyShlInst().
const TargetLibraryInfo* llvm::SimplifyQuery::TLI = nullptr |
Definition at line 72 of file SimplifyQuery.h.
Referenced by computePointerICmp(), runImpl(), simplifyFCmpInst(), simplifyICmpInst(), simplifyInstructionWithOperands(), simplifyWithOpReplaced(), and tryConstantFoldCall().