/netbsd-src/external/apache2/llvm/dist/clang/include/clang/AST/ |
H A D | StmtVisitor.h | 47 if (PTR(BinaryOperator) BinOp = dyn_cast<BinaryOperator>(S)) { in Visit() 49 case BO_PtrMemD: DISPATCH(BinPtrMemD, BinaryOperator); in Visit() 50 case BO_PtrMemI: DISPATCH(BinPtrMemI, BinaryOperator); in Visit() 51 case BO_Mul: DISPATCH(BinMul, BinaryOperator); in Visit() 52 case BO_Div: DISPATCH(BinDiv, BinaryOperator); in Visit() 53 case BO_Rem: DISPATCH(BinRem, BinaryOperator); in Visit() 54 case BO_Add: DISPATCH(BinAdd, BinaryOperator); in Visit() 55 case BO_Sub: DISPATCH(BinSub, BinaryOperator); in Visit() 56 case BO_Shl: DISPATCH(BinShl, BinaryOperator); in Visit() 57 case BO_Shr: DISPATCH(BinShr, BinaryOperator); in Visit() [all …]
|
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/IR/ |
H A D | NoFolder.h | 47 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS); 54 return BinaryOperator::CreateFAdd(LHS, RHS); in CreateFAdd() 60 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS); 67 return BinaryOperator::CreateFSub(LHS, RHS); in CreateFSub() 73 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS); 80 return BinaryOperator::CreateFMul(LHS, RHS); in CreateFMul() 86 return BinaryOperator::CreateUDiv(LHS, RHS); 87 return BinaryOperator::CreateExactUDiv(LHS, RHS); 93 return BinaryOperator::CreateSDiv(LHS, RHS); 94 return BinaryOperator::CreateExactSDiv(LHS, RHS); [all …]
|
H A D | Instruction.def | 147 HANDLE_BINARY_INST(13, Add , BinaryOperator) 148 HANDLE_BINARY_INST(14, FAdd , BinaryOperator) 149 HANDLE_BINARY_INST(15, Sub , BinaryOperator) 150 HANDLE_BINARY_INST(16, FSub , BinaryOperator) 151 HANDLE_BINARY_INST(17, Mul , BinaryOperator) 152 HANDLE_BINARY_INST(18, FMul , BinaryOperator) 153 HANDLE_BINARY_INST(19, UDiv , BinaryOperator) 154 HANDLE_BINARY_INST(20, SDiv , BinaryOperator) 155 HANDLE_BINARY_INST(21, FDiv , BinaryOperator) 156 HANDLE_BINARY_INST(22, URem , BinaryOperator) [all …]
|
H A D | InstrTypes.h | 190 class BinaryOperator : public Instruction { 194 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, 196 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, 202 BinaryOperator *cloneImpl() const; 218 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, 226 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, 233 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ 239 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ 245 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ 251 static BinaryOperator *CreateWithCopiedFlags(BinaryOps Opc, [all …]
|
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/InstCombine/ |
H A D | InstCombineInternal.h | 88 Instruction *visitAdd(BinaryOperator &I); 89 Instruction *visitFAdd(BinaryOperator &I); 92 Instruction *visitSub(BinaryOperator &I); 93 Instruction *visitFSub(BinaryOperator &I); 94 Instruction *visitMul(BinaryOperator &I); 95 Instruction *visitFMul(BinaryOperator &I); 96 Instruction *visitURem(BinaryOperator &I); 97 Instruction *visitSRem(BinaryOperator &I); 98 Instruction *visitFRem(BinaryOperator &I); 99 bool simplifyDivRemOfSelectWithZeroOp(BinaryOperator &I); [all …]
|
H A D | InstCombineMulDivRem.cpp | 70 BinaryOperator *I = dyn_cast<BinaryOperator>(V); in simplifyValueKnownNonZero() 103 static Value *foldMulSelectToNegate(BinaryOperator &I, in foldMulSelectToNegate() 142 Instruction *InstCombinerImpl::visitMul(BinaryOperator &I) { in visitMul() 161 BinaryOperator *BO = BinaryOperator::CreateNeg(Op0, I.getName()); in visitMul() 177 BinaryOperator *Mul = cast<BinaryOperator>(I.getOperand(0)); in visitMul() 178 BinaryOperator *BO = BinaryOperator::CreateMul(NewOp, Shl); in visitMul() 190 BinaryOperator *Shl = BinaryOperator::CreateShl(NewOp, NewCst); in visitMul() 209 return BinaryOperator::CreateMul( in visitMul() 229 return BinaryOperator::CreateAdd(Builder.CreateMul(X, Op1), Mul); in visitMul() 239 return BinaryOperator::CreateMul(X, X); in visitMul() [all …]
|
H A D | InstCombineAddSub.cpp | 767 static Value *checkForNegativeOperand(BinaryOperator &I, in checkForNegativeOperand() 824 static Instruction *foldNoWrapAdd(BinaryOperator &Add, in foldNoWrapAdd() 851 return BinaryOperator::CreateAdd(WideX, NewC); in foldNoWrapAdd() 858 return BinaryOperator::CreateAdd(WideX, NewC); in foldNoWrapAdd() 864 Instruction *InstCombinerImpl::foldAddWithConstant(BinaryOperator &Add) { in foldAddWithConstant() 878 return BinaryOperator::CreateSub(ConstantExpr::getAdd(Op00C, Op1C), X); in foldAddWithConstant() 885 return BinaryOperator::CreateAdd(Builder.CreateNot(Y), X); in foldAddWithConstant() 898 return BinaryOperator::CreateSub(InstCombiner::SubOne(Op1C), X); in foldAddWithConstant() 908 return BinaryOperator::CreateAdd(X, ConstantExpr::getAdd(Op01C, Op1C)); in foldAddWithConstant() 913 return BinaryOperator::CreateXor(Op0, ConstantInt::get(Add.getType(), *C2)); in foldAddWithConstant() [all …]
|
H A D | InstCombineShifts.cpp | 60 BinaryOperator *Sh0, const SimplifyQuery &SQ, in reassociateShiftAmtsOfTwoSameDirectionShifts() 143 BinaryOperator *NewShift = BinaryOperator::Create(ShiftOpcode, X, NewShAmt); in reassociateShiftAmtsOfTwoSameDirectionShifts() 185 dropRedundantMaskingOfLeftShiftInput(BinaryOperator *OuterShift, in dropRedundantMaskingOfLeftShiftInput() 317 auto *NewShift = BinaryOperator::Create(OuterShift->getOpcode(), X, in dropRedundantMaskingOfLeftShiftInput() 323 return BinaryOperator::Create(Instruction::And, NewShift, NewMask); in dropRedundantMaskingOfLeftShiftInput() 330 static Instruction *foldShiftOfShiftedLogic(BinaryOperator &I, in foldShiftOfShiftedLogic() 333 auto *LogicInst = dyn_cast<BinaryOperator>(I.getOperand(0)); in foldShiftOfShiftedLogic() 349 BinaryOperator *BO; in foldShiftOfShiftedLogic() 369 return BinaryOperator::Create(LogicInst->getOpcode(), NewShift1, NewShift2); in foldShiftOfShiftedLogic() 372 Instruction *InstCombinerImpl::commonShiftTransforms(BinaryOperator &I) { in commonShiftTransforms() [all …]
|
H A D | InstCombineAndOrXor.cpp | 84 static Value *SimplifyBSwap(BinaryOperator &I, in SimplifyBSwap() 1163 BinaryOperator &Logic, in foldAndOrOfICmpsWithConstEq() 1207 BinaryOperator &And) { in foldAndOfICmps() 1485 static Instruction *reassociateFCmps(BinaryOperator &BO, in reassociateFCmps() 1499 BinaryOperator *BO1; in reassociateFCmps() 1524 return BinaryOperator::Create(Opcode, NewFCmp, BO11); in reassociateFCmps() 1530 static Instruction *matchDeMorgansLaws(BinaryOperator &I, in matchDeMorgansLaws() 1545 return BinaryOperator::CreateNot(AndOr); in matchDeMorgansLaws() 1568 static Instruction *foldLogicCastConstant(BinaryOperator &Logic, CastInst *Cast, in foldLogicCastConstant() 1607 Instruction *InstCombinerImpl::foldCastedBitwiseLogic(BinaryOperator &I) { in foldCastedBitwiseLogic() [all …]
|
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Transforms/Utils/ |
H A D | IntegerDivision.h | 20 class BinaryOperator; variable 32 bool expandRemainder(BinaryOperator *Rem); 41 bool expandDivision(BinaryOperator* Div); 49 bool expandRemainderUpTo32Bits(BinaryOperator *Rem); 55 bool expandRemainderUpTo64Bits(BinaryOperator *Rem); 62 bool expandDivisionUpTo32Bits(BinaryOperator *Div); 68 bool expandDivisionUpTo64Bits(BinaryOperator *Div);
|
/netbsd-src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Core/ |
H A D | SimpleSValBuilder.cpp | 33 SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op, 35 SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op, 37 SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op, 48 SVal MakeSymIntVal(const SymExpr *LHS, BinaryOperator::Opcode op, 86 BinaryOperator::Opcode op, in MakeSymIntVal() 155 if (BinaryOperator::isComparisonOp(op)) { in MakeSymIntVal() 181 static bool isInRelation(BinaryOperator::Opcode Rel, SymbolRef Sym, in isInRelation() 226 if (BinaryOperator::isAdditiveOp(SymInt->getOpcode())) in decomposeSymbol() 240 BinaryOperator::Opcode Op, in doRearrangeUnchecked() 256 if (BinaryOperator::isComparisonOp(Op)) in doRearrangeUnchecked() [all …]
|
H A D | RangedConstraintManager.cpp | 34 BinaryOperator::Opcode op = SIE->getOpcode(); in assumeSym() 35 if (BinaryOperator::isComparisonOp(op) && op != BO_Cmp) { in assumeSym() 37 op = BinaryOperator::negateComparisonOp(op); in assumeSym() 43 BinaryOperator::Opcode Op = SSE->getOpcode(); in assumeSym() 44 assert(BinaryOperator::isComparisonOp(Op)); in assumeSym() 62 Op = BinaryOperator::reverseComparisonOp(Op); in assumeSym() 64 Op = BinaryOperator::negateComparisonOp(Op); in assumeSym() 68 if (BinaryOperator::isEqualityOp(Op)) { in assumeSym() 141 BinaryOperator::Opcode Op, in assumeSymRel() 143 assert(BinaryOperator::isComparisonOp(Op) && in assumeSymRel() [all …]
|
/netbsd-src/external/apache2/llvm/dist/clang/lib/StaticAnalyzer/Checkers/ |
H A D | IdenticalExprChecker.cpp | 48 bool VisitBinaryOperator(const BinaryOperator *B); 53 void reportIdenticalExpr(const BinaryOperator *B, bool CheckBitwise, 55 void checkBitwiseOrLogicalOp(const BinaryOperator *B, bool CheckBitwise); 56 void checkComparisonOp(const BinaryOperator *B); 60 void FindIdenticalExprVisitor::reportIdenticalExpr(const BinaryOperator *B, in reportIdenticalExpr() 77 void FindIdenticalExprVisitor::checkBitwiseOrLogicalOp(const BinaryOperator *B, in checkBitwiseOrLogicalOp() 88 while (const BinaryOperator *B2 = dyn_cast<BinaryOperator>(LHS)) { in checkBitwiseOrLogicalOp() 181 bool FindIdenticalExprVisitor::VisitBinaryOperator(const BinaryOperator *B) { in VisitBinaryOperator() 182 BinaryOperator::Opcode Op = B->getOpcode(); in VisitBinaryOperator() 184 if (BinaryOperator::isBitwiseOp(Op)) in VisitBinaryOperator() [all …]
|
H A D | UndefResultChecker.cpp | 29 : public Checker< check::PostStmt<BinaryOperator> > { 34 void checkPostStmt(const BinaryOperator *B, CheckerContext &C) const; 61 static bool isShiftOverflow(const BinaryOperator *B, CheckerContext &C) { in isShiftOverflow() 66 static bool isLeftShiftResultUnrepresentable(const BinaryOperator *B, in isLeftShiftResultUnrepresentable() 76 void UndefResultChecker::checkPostStmt(const BinaryOperator *B, in checkPostStmt() 113 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt() 170 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt()
|
H A D | TestAfterDivZeroChecker.cpp | 78 : public Checker<check::PreStmt<BinaryOperator>, check::BranchCondition, 84 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; 104 if (const BinaryOperator *BO = P->getStmtAs<BinaryOperator>()) { in REGISTER_SET_WITH_PROGRAMSTATE() 105 BinaryOperator::Opcode Op = BO->getOpcode(); in REGISTER_SET_WITH_PROGRAMSTATE() 200 void TestAfterDivZeroChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt() 202 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt() 214 if (const BinaryOperator *B = dyn_cast<BinaryOperator>(Condition)) { in checkBranchCondition()
|
H A D | MallocOverflowSecurityChecker.cpp | 35 const BinaryOperator *mulop; 39 MallocOverflowCheck(const BinaryOperator *m, const Expr *v, APSInt val) in MallocOverflowCheck() 75 const BinaryOperator * mulop = nullptr; in CheckMallocArgument() 81 if (const BinaryOperator *binop = dyn_cast<BinaryOperator>(e)) { in CheckMallocArgument() 175 void CheckAssignmentExpr(BinaryOperator *AssignEx) { in CheckAssignmentExpr() 190 if (const BinaryOperator *BOp = dyn_cast<BinaryOperator>(rhse)) { in CheckAssignmentExpr() 227 void VisitBinaryOperator(BinaryOperator *E) { in VisitBinaryOperator()
|
H A D | DivZeroChecker.cpp | 26 class DivZeroChecker : public Checker< check::PreStmt<BinaryOperator> > { 32 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; 38 if (const auto *BE = dyn_cast<BinaryOperator>(S)) in getDenomExpr() 57 void DivZeroChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt() 59 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt()
|
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Scalar/ |
H A D | Reassociate.cpp | 149 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode) { in isReassociableOp() 153 return cast<BinaryOperator>(I); in isReassociableOp() 157 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode1, in isReassociableOp() 163 return cast<BinaryOperator>(I); in isReassociableOp() 223 assert(isa<BinaryOperator>(I) && "Expected binary operator."); in canonicalizeOperands() 231 cast<BinaryOperator>(I)->swapOperands(); in canonicalizeOperands() 234 static BinaryOperator *CreateAdd(Value *S1, Value *S2, const Twine &Name, in CreateAdd() 237 return BinaryOperator::CreateAdd(S1, S2, Name, InsertBefore); in CreateAdd() 239 BinaryOperator *Res = in CreateAdd() 240 BinaryOperator::CreateFAdd(S1, S2, Name, InsertBefore); in CreateAdd() [all …]
|
H A D | CorrelatedValuePropagation.cpp | 446 static bool processBinOp(BinaryOperator *BinOp, LazyValueInfo *LVI); 501 if (auto *BO = dyn_cast<BinaryOperator>(NegX)) in processAbsIntrinsic() 542 if (auto *BO = dyn_cast<BinaryOperator>(NewOp)) in processOverflowIntrinsic() 552 BinaryOperator *BinOp = BinaryOperator::Create( in processSaturatingInst() 562 if (auto *BO = dyn_cast<BinaryOperator>(BinOp)) in processSaturatingInst() 672 static bool narrowSDivOrSRem(BinaryOperator *Instr, LazyValueInfo *LVI) { in narrowSDivOrSRem() 715 if (auto *BinOp = dyn_cast<BinaryOperator>(BO)) in narrowSDivOrSRem() 726 static bool processUDivOrURem(BinaryOperator *Instr, LazyValueInfo *LVI) { in processUDivOrURem() 759 if (auto *BinOp = dyn_cast<BinaryOperator>(BO)) in processUDivOrURem() 768 static bool processSRem(BinaryOperator *SDI, LazyValueInfo *LVI) { in processSRem() [all …]
|
/netbsd-src/external/apache2/llvm/dist/llvm/include/llvm/Transforms/Scalar/ |
H A D | NaryReassociate.h | 89 class BinaryOperator; variable 139 Instruction *tryReassociateBinaryOp(BinaryOperator *I); 144 BinaryOperator *I); 147 BinaryOperator *I); 150 bool matchTernaryOp(BinaryOperator *I, Value *V, Value *&Op1, Value *&Op2); 153 const SCEV *getBinarySCEV(BinaryOperator *I, const SCEV *LHS,
|
H A D | Reassociate.h | 36 class BinaryOperator; variable 103 void ReassociateExpression(BinaryOperator *I); 104 void RewriteExprTree(BinaryOperator *I, 106 Value *OptimizeExpression(BinaryOperator *I, 119 Value *OptimizeMul(BinaryOperator *I,
|
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Transforms/Utils/ |
H A D | IntegerDivision.cpp | 375 bool llvm::expandRemainder(BinaryOperator *Rem) { in expandRemainder() 404 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandRemainder() 417 if (BinaryOperator *UDiv = dyn_cast<BinaryOperator>(Builder.GetInsertPoint())) { in expandRemainder() 433 bool llvm::expandDivision(BinaryOperator *Div) { in expandDivision() 463 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandDivision() 485 bool llvm::expandRemainderUpTo32Bits(BinaryOperator *Rem) { in expandRemainderUpTo32Bits() 526 return expandRemainder(cast<BinaryOperator>(ExtRem)); in expandRemainderUpTo32Bits() 534 bool llvm::expandRemainderUpTo64Bits(BinaryOperator *Rem) { in expandRemainderUpTo64Bits() 574 return expandRemainder(cast<BinaryOperator>(ExtRem)); in expandRemainderUpTo64Bits() 583 bool llvm::expandDivisionUpTo32Bits(BinaryOperator *Div) { in expandDivisionUpTo32Bits() [all …]
|
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Target/AMDGPU/ |
H A D | AMDGPUCodeGenPrepare.cpp | 94 bool isSigned(const BinaryOperator &I) const; 115 bool promoteUniformOpToI32(BinaryOperator &I) const; 158 bool replaceMulWithMul24(BinaryOperator &I) const; 162 bool foldBinOpIntoSelect(BinaryOperator &I) const; 164 bool divHasSpecialOptimization(BinaryOperator &I, 166 int getDivNumBits(BinaryOperator &I, 171 Value* expandDivRem24(IRBuilder<> &Builder, BinaryOperator &I, 175 Value *expandDivRem24Impl(IRBuilder<> &Builder, BinaryOperator &I, 180 Value* expandDivRem32(IRBuilder<> &Builder, BinaryOperator &I, 183 Value *shrinkDivRem64(IRBuilder<> &Builder, BinaryOperator &I, [all …]
|
/netbsd-src/external/apache2/llvm/dist/llvm/lib/Analysis/ |
H A D | Lint.cpp | 105 void visitXor(BinaryOperator &I); 106 void visitSub(BinaryOperator &I); 107 void visitLShr(BinaryOperator &I); 108 void visitAShr(BinaryOperator &I); 109 void visitShl(BinaryOperator &I); 110 void visitSDiv(BinaryOperator &I); 111 void visitUDiv(BinaryOperator &I); 112 void visitSRem(BinaryOperator &I); 113 void visitURem(BinaryOperator &I); 488 void Lint::visitXor(BinaryOperator &I) { in visitXor() [all …]
|
H A D | PHITransAddr.cpp | 257 bool isNSW = cast<BinaryOperator>(Inst)->hasNoSignedWrap(); in PHITranslateSubExpr() 258 bool isNUW = cast<BinaryOperator>(Inst)->hasNoUnsignedWrap(); in PHITranslateSubExpr() 264 if (BinaryOperator *BOp = dyn_cast<BinaryOperator>(LHS)) in PHITranslateSubExpr() 292 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U)) in PHITranslateSubExpr() 428 BinaryOperator *Res = BinaryOperator::CreateAdd(OpVal, Inst->getOperand(1), in InsertPHITranslatedSubExpr() 431 Res->setHasNoSignedWrap(cast<BinaryOperator>(Inst)->hasNoSignedWrap()); in InsertPHITranslatedSubExpr() 432 Res->setHasNoUnsignedWrap(cast<BinaryOperator>(Inst)->hasNoUnsignedWrap()); in InsertPHITranslatedSubExpr()
|