Changeset View
Changeset View
Standalone View
Standalone View
llvm/include/llvm/Analysis/InstructionSimplify.h
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | SimplifyQuery(const DataLayout &DL, const TargetLibraryInfo *TLI, | ||||
bool CanUseUndef = true) | bool CanUseUndef = true) | ||||
: DL(DL), TLI(TLI), DT(DT), AC(AC), CxtI(CXTI), IIQ(UseInstrInfo), | : DL(DL), TLI(TLI), DT(DT), AC(AC), CxtI(CXTI), IIQ(UseInstrInfo), | ||||
CanUseUndef(CanUseUndef) {} | CanUseUndef(CanUseUndef) {} | ||||
SimplifyQuery getWithInstruction(Instruction *I) const { | SimplifyQuery getWithInstruction(Instruction *I) const { | ||||
SimplifyQuery Copy(*this); | SimplifyQuery Copy(*this); | ||||
Copy.CxtI = I; | Copy.CxtI = I; | ||||
return Copy; | return Copy; | ||||
} | } | ||||
SimplifyQuery getWithoutUndef() const { | |||||
SimplifyQuery Copy(*this); | |||||
Copy.CanUseUndef = false; | |||||
return Copy; | |||||
} | |||||
}; | }; | ||||
// NOTE: the explicit multiple argument versions of these functions are | // NOTE: the explicit multiple argument versions of these functions are | ||||
// deprecated. | // deprecated. | ||||
// Please use the SimplifyQuery versions in new code. | // Please use the SimplifyQuery versions in new code. | ||||
/// Given operand for an FNeg, fold the result or return null. | /// Given operand for an FNeg, fold the result or return null. | ||||
Value *SimplifyFNegInst(Value *Op, FastMathFlags FMF, | Value *SimplifyFNegInst(Value *Op, FastMathFlags FMF, | ||||
▲ Show 20 Lines • Show All 187 Lines • Show Last 20 Lines |