Home
last modified time | relevance | path

Searched refs:BinaryOperator (Results 1 – 25 of 236) sorted by relevance

12345678910

/freebsd-12.1/contrib/llvm/include/llvm/IR/
H A DNoFolder.h44 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS);
59 return BinaryOperator::CreateFAdd(LHS, RHS); in CreateFAdd()
64 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS);
84 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS);
142 BinaryOperator *BO = BinaryOperator::CreateShl(LHS, RHS);
167 return BinaryOperator::CreateOr(LHS, RHS); in CreateOr()
185 BinaryOperator *BO = BinaryOperator::CreateNeg(C);
192 return BinaryOperator::CreateNSWNeg(C); in CreateNSWNeg()
196 return BinaryOperator::CreateNUWNeg(C); in CreateNUWNeg()
200 return BinaryOperator::CreateFNeg(C); in CreateFNeg()
[all …]
H A DInstrTypes.h102 class BinaryOperator : public Instruction {
114 BinaryOperator *cloneImpl() const;
167 BinaryOperator *BO = Create(Opc, V1, V2, Name);
197 static BinaryOperator *CreateFNegFMF(Value *Op, BinaryOperator *FMFSource,
205 BinaryOperator *BO = Create(Opc, V1, V2, Name);
217 BinaryOperator *BO = Create(Opc, V1, V2, Name, I);
224 BinaryOperator *BO = Create(Opc, V1, V2, Name);
236 BinaryOperator *BO = Create(Opc, V1, V2, Name, I);
243 BinaryOperator *BO = Create(Opc, V1, V2, Name);
337 struct OperandTraits<BinaryOperator> :
[all …]
H A DInstruction.def147 HANDLE_BINARY_INST(12, Add , BinaryOperator)
148 HANDLE_BINARY_INST(13, FAdd , BinaryOperator)
149 HANDLE_BINARY_INST(14, Sub , BinaryOperator)
150 HANDLE_BINARY_INST(15, FSub , BinaryOperator)
151 HANDLE_BINARY_INST(16, Mul , BinaryOperator)
152 HANDLE_BINARY_INST(17, FMul , BinaryOperator)
153 HANDLE_BINARY_INST(18, UDiv , BinaryOperator)
154 HANDLE_BINARY_INST(19, SDiv , BinaryOperator)
155 HANDLE_BINARY_INST(20, FDiv , BinaryOperator)
156 HANDLE_BINARY_INST(21, URem , BinaryOperator)
[all …]
/freebsd-12.1/contrib/llvm/tools/clang/include/clang/AST/
H A DStmtVisitor.h47 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 …]
/freebsd-12.1/contrib/llvm/lib/Transforms/InstCombine/
H A DInstCombineInternal.h175 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(V)) in IsFreeToInvert()
348 Instruction *visitAdd(BinaryOperator &I);
349 Instruction *visitFAdd(BinaryOperator &I);
351 Instruction *visitSub(BinaryOperator &I);
352 Instruction *visitFSub(BinaryOperator &I);
353 Instruction *visitMul(BinaryOperator &I);
354 Instruction *visitFMul(BinaryOperator &I);
367 Instruction *visitAnd(BinaryOperator &I);
368 Instruction *visitOr(BinaryOperator &I);
369 Instruction *visitXor(BinaryOperator &I);
[all …]
H A DInstCombineMulDivRem.cpp70 BinaryOperator *I = dyn_cast<BinaryOperator>(V); in simplifyValueKnownNonZero()
145 BinaryOperator *BO = BinaryOperator::CreateNeg(Op0, I.getName()); in visitMul()
161 BinaryOperator *Mul = cast<BinaryOperator>(I.getOperand(0)); in visitMul()
162 BinaryOperator *BO = BinaryOperator::CreateMul(NewOp, Shl); in visitMul()
174 BinaryOperator *Shl = BinaryOperator::CreateShl(NewOp, NewCst); in visitMul()
256 BinaryOperator *Div = dyn_cast<BinaryOperator>(Op0); in visitMul()
260 Div = dyn_cast<BinaryOperator>(Op1); in visitMul()
293 BinaryOperator *BO = nullptr; in visitMul()
763 BinaryOperator *LShr = BinaryOperator::CreateLShr(Op0, C1); in foldUDivPow2Cst()
787 BinaryOperator *LShr = BinaryOperator::CreateLShr(Op0, N); in foldUDivShl()
[all …]
H A DInstCombineAddSub.cpp1132 return BinaryOperator::CreateSub(A, B); in visitAdd()
1201 return BinaryOperator::CreateOr(A, B); in visitAdd()
1468 BinaryOperator *Res = BinaryOperator::CreateAdd(Op0, V); in visitSub()
1488 return BinaryOperator::CreateNot(Op1); in visitSub()
1493 return BinaryOperator::CreateSub(Y, X); in visitSub()
1591 return BinaryOperator::CreateNeg(Y); in visitSub()
1595 return BinaryOperator::CreateNeg(Y); in visitSub()
1610 return BinaryOperator::CreateAnd( in visitSub()
1620 return BinaryOperator::CreateAdd(Op0, in visitSub()
1625 return BinaryOperator::CreateAnd(Op0, in visitSub()
[all …]
H A DInstCombineShifts.cpp49 return BinaryOperator::Create( in commonShiftTransforms()
424 if (BinaryOperator *Op0BO = dyn_cast<BinaryOperator>(Op0)) { in FoldShiftByConstant()
450 return BinaryOperator::CreateAnd(X, Mask); in FoldShiftByConstant()
485 return BinaryOperator::CreateAnd(X, Mask); in FoldShiftByConstant()
548 BinaryOperator *TBO; in FoldShiftByConstant()
567 BinaryOperator *FBO; in FoldShiftByConstant()
590 Instruction *InstCombiner::visitShl(BinaryOperator &I) { in visitShl()
641 auto *NewShr = BinaryOperator::Create( in visitShl()
676 return BinaryOperator::CreateAnd(Mask, X); in visitShl()
818 return BinaryOperator::CreateAnd(Mask, X); in visitLShr()
[all …]
H A DInstCombineAndOrXor.cpp83 static Value *SimplifyBSwap(BinaryOperator &I, in SimplifyBSwap()
1598 BinaryOperator::BinaryOps BinOp = cast<BinaryOperator>(Op0)->getOpcode(); in visitAnd()
1619 if (BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0)) { in visitAnd()
2369 if (BinaryOperator *B = dyn_cast<BinaryOperator>(A)) in visitOr()
2721 BinaryOperator *NotVal; in visitXor()
2822 if (BinaryOperator *Op0I = dyn_cast<BinaryOperator>(Op0)) { in visitXor()
2827 BinaryOperator *E1; in visitXor()
2879 return BinaryOperator::CreateXor( in visitXor()
2885 return BinaryOperator::CreateXor( in visitXor()
2891 return BinaryOperator::CreateOr(A, B); in visitXor()
[all …]
/freebsd-12.1/contrib/llvm/include/llvm/Transforms/Utils/
H A DIntegerDivision.h21 class BinaryOperator; variable
33 bool expandRemainder(BinaryOperator *Rem);
42 bool expandDivision(BinaryOperator* Div);
50 bool expandRemainderUpTo32Bits(BinaryOperator *Rem);
56 bool expandRemainderUpTo64Bits(BinaryOperator *Rem);
63 bool expandDivisionUpTo32Bits(BinaryOperator *Div);
69 bool expandDivisionUpTo64Bits(BinaryOperator *Div);
/freebsd-12.1/contrib/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp238 BinaryOperator *Res = in CreateAdd()
250 BinaryOperator *Res = in CreateMul()
262 BinaryOperator *Res = BinaryOperator::CreateFNeg(S1, Name, InsertBefore); in CreateNeg()
576 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op)) in LinearizeExprTree()
646 BinaryOperator *Op = I; in RewriteExprTree()
859 BinaryOperator *TheNeg = cast<BinaryOperator>(U); in NegateValue()
952 BinaryOperator *Mul = in ConvertShiftToMul()
1977 BinaryOperator *NI; in canonicalizeNegConstExpr()
2061 if (BinaryOperator *Tmp = dyn_cast<BinaryOperator>(U)) in OptimizeInst()
2085 if (BinaryOperator *Tmp = dyn_cast<BinaryOperator>(U)) in OptimizeInst()
[all …]
H A DCorrelatedValuePropagation.cpp537 if (auto *BinOp = dyn_cast<BinaryOperator>(BO)) in processUDivOrURem()
546 static bool processSRem(BinaryOperator *SDI, LazyValueInfo *LVI) { in processSRem()
568 static bool processSDiv(BinaryOperator *SDI, LazyValueInfo *LVI) { in processSDiv()
586 static bool processAShr(BinaryOperator *SDI, LazyValueInfo *LVI) { in processAShr()
606 static bool processAdd(BinaryOperator *AddOp, LazyValueInfo *LVI) { in processAdd()
640 BinaryOperator::Add, LRange, OBO::NoUnsignedWrap); in processAdd()
649 BinaryOperator::Add, LRange, OBO::NoSignedWrap); in processAdd()
715 BBChanged |= processSRem(cast<BinaryOperator>(II), LVI); in runImpl()
718 BBChanged |= processSDiv(cast<BinaryOperator>(II), LVI); in runImpl()
725 BBChanged |= processAShr(cast<BinaryOperator>(II), LVI); in runImpl()
[all …]
H A DSeparateConstOffsetFromGEP.cpp268 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended,
486 BinaryOperator *BO, in CanTraceInto()
549 APInt ConstantOffsetExtractor::findInEitherOperand(BinaryOperator *BO, in findInEitherOperand()
586 } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(V)) { in find()
667 BinaryOperator *BO = cast<BinaryOperator>(U); in distributeExtsAndCloneChain()
673 BinaryOperator *NewBO = nullptr; in distributeExtsAndCloneChain()
690 BinaryOperator *BO = cast<BinaryOperator>(UserChain[ChainIndex]); in removeConstOffset()
708 BinaryOperator::BinaryOps NewOp = BO->getOpcode(); in removeConstOffset()
726 BinaryOperator *NewBO; in removeConstOffset()
728 NewBO = BinaryOperator::Create(NewOp, NextInChain, TheOther, "", IP); in removeConstOffset()
[all …]
/freebsd-12.1/contrib/llvm/tools/clang/lib/StaticAnalyzer/Core/
H A DRangedConstraintManager.cpp35 BinaryOperator::Opcode op = SIE->getOpcode(); in assumeSym()
36 if (BinaryOperator::isComparisonOp(op) && op != BO_Cmp) { in assumeSym()
38 op = BinaryOperator::negateComparisonOp(op); in assumeSym()
51 BinaryOperator::Opcode Op = SSE->getOpcode(); in assumeSym()
52 assert(BinaryOperator::isComparisonOp(Op)); in assumeSym()
62 Op = BinaryOperator::reverseComparisonOp(Op); in assumeSym()
64 Op = BinaryOperator::negateComparisonOp(Op); in assumeSym()
122 BinaryOperator::Opcode Op, in assumeSymRel()
124 assert(BinaryOperator::isComparisonOp(Op) && in assumeSymRel()
134 if (BinaryOperator::isComparisonOp(SE->getOpcode())) in assumeSymRel()
[all …]
H A DSimpleSValBuilder.cpp288 if (BinaryOperator::isComparisonOp(op)) { in MakeSymIntVal()
389 if (BinaryOperator::isComparisonOp(Op)) in doRearrangeUnchecked()
391 else if (BinaryOperator::isAdditiveOp(Op)) in doRearrangeUnchecked()
403 BinaryOperator::Opcode ResultOp; in doRearrangeUnchecked()
405 if (BinaryOperator::isComparisonOp(Op)) { in doRearrangeUnchecked()
442 (!BinaryOperator::isComparisonOp(Op) || in shouldRearrange()
469 if (BinaryOperator::isComparisonOp(Op)) { in tryRearrange()
474 } else if (BinaryOperator::isAdditiveOp(Op)) { in tryRearrange()
773 if (!BinaryOperator::isComparisonOp(op)) in evalBinOpFieldRegionFieldRegion()
928 if (BinaryOperator::isComparisonOp(op)) in evalBinOpLL()
[all …]
/freebsd-12.1/contrib/llvm/tools/clang/lib/StaticAnalyzer/Checkers/
H A DIdenticalExprChecker.cpp49 bool VisitBinaryOperator(const BinaryOperator *B);
54 void reportIdenticalExpr(const BinaryOperator *B, bool CheckBitwise,
57 void checkComparisonOp(const BinaryOperator *B);
89 while (const BinaryOperator *B2 = dyn_cast<BinaryOperator>(LHS)) { in checkBitwiseOrLogicalOp()
183 BinaryOperator::Opcode Op = B->getOpcode(); in VisitBinaryOperator()
185 if (BinaryOperator::isBitwiseOp(Op)) in VisitBinaryOperator()
188 if (BinaryOperator::isLogicalOp(Op)) in VisitBinaryOperator()
191 if (BinaryOperator::isComparisonOp(Op)) in VisitBinaryOperator()
201 BinaryOperator::Opcode Op = B->getOpcode(); in checkComparisonOp()
451 const BinaryOperator *BinOp1 = cast<BinaryOperator>(Stmt1); in isIdenticalStmt()
[all …]
H A DUndefResultChecker.cpp29 : 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 DDivZeroChecker.cpp25 class DivZeroChecker : public Checker< check::PreStmt<BinaryOperator> > {
31 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const;
37 if (const auto *BE = dyn_cast<BinaryOperator>(S)) in getDenomExpr()
56 void DivZeroChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
58 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt()
H A DTestAfterDivZeroChecker.cpp79 : public Checker<check::PreStmt<BinaryOperator>, check::BranchCondition,
85 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const;
105 if (const BinaryOperator *BO = P->getStmtAs<BinaryOperator>()) { in REGISTER_SET_WITH_PROGRAMSTATE()
106 BinaryOperator::Opcode Op = BO->getOpcode(); in REGISTER_SET_WITH_PROGRAMSTATE()
201 void TestAfterDivZeroChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
203 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt()
215 if (const BinaryOperator *B = dyn_cast<BinaryOperator>(Condition)) { in checkBranchCondition()
H A DMallocOverflowSecurityChecker.cpp36 const BinaryOperator *mulop;
40 MallocOverflowCheck(const BinaryOperator *m, const Expr *v, APSInt val) in MallocOverflowCheck()
76 const BinaryOperator * mulop = nullptr; in CheckMallocArgument()
82 if (const BinaryOperator *binop = dyn_cast<BinaryOperator>(e)) { in CheckMallocArgument()
176 void CheckAssignmentExpr(BinaryOperator *AssignEx) { in CheckAssignmentExpr()
191 if (const BinaryOperator *BOp = dyn_cast<BinaryOperator>(rhse)) { in CheckAssignmentExpr()
228 void VisitBinaryOperator(BinaryOperator *E) { in VisitBinaryOperator()
/freebsd-12.1/contrib/llvm/include/llvm/Transforms/Scalar/
H A DNaryReassociate.h90 class BinaryOperator; variable
140 Instruction *tryReassociateBinaryOp(BinaryOperator *I);
145 BinaryOperator *I);
148 BinaryOperator *I);
151 bool matchTernaryOp(BinaryOperator *I, Value *V, Value *&Op1, Value *&Op2);
154 const SCEV *getBinarySCEV(BinaryOperator *I, const SCEV *LHS,
H A DReassociate.h38 class BinaryOperator; variable
97 void ReassociateExpression(BinaryOperator *I);
98 void RewriteExprTree(BinaryOperator *I,
100 Value *OptimizeExpression(BinaryOperator *I,
113 Value *OptimizeMul(BinaryOperator *I,
/freebsd-12.1/contrib/llvm/lib/Transforms/Utils/
H A DSimplifyIndVar.cpp90 void replaceRemWithNumerator(BinaryOperator *Rem);
91 void replaceRemWithNumeratorOrZero(BinaryOperator *Rem);
92 void replaceSRemWithURem(BinaryOperator *Rem);
93 bool eliminateSDiv(BinaryOperator *SDiv);
125 if (!isa<BinaryOperator>(IVOperand) in foldIVUser()
303 auto *UDiv = BinaryOperator::Create( in eliminateSDiv()
321 auto *URem = BinaryOperator::Create(BinaryOperator::URem, N, D, in replaceSRemWithURem()
476 BinaryOperator *NewResult = BinaryOperator::Create( in eliminateOverflowIntrinsic()
628 if (BinaryOperator *Bin = dyn_cast<BinaryOperator>(UseInst)) { in eliminateIVUser()
807 BinaryOperator *Shr = cast<BinaryOperator>(U); in strengthenRightShift()
[all …]
H A DIntegerDivision.cpp376 bool llvm::expandRemainder(BinaryOperator *Rem) { in expandRemainder()
405 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandRemainder()
418 if (BinaryOperator *UDiv = dyn_cast<BinaryOperator>(Builder.GetInsertPoint())) { in expandRemainder()
434 bool llvm::expandDivision(BinaryOperator *Div) { in expandDivision()
464 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandDivision()
527 return expandRemainder(cast<BinaryOperator>(ExtRem)); in expandRemainderUpTo32Bits()
575 return expandRemainder(cast<BinaryOperator>(ExtRem)); in expandRemainderUpTo64Bits()
584 bool llvm::expandDivisionUpTo32Bits(BinaryOperator *Div) { in expandDivisionUpTo32Bits()
624 return expandDivision(cast<BinaryOperator>(ExtDiv)); in expandDivisionUpTo32Bits()
632 bool llvm::expandDivisionUpTo64Bits(BinaryOperator *Div) { in expandDivisionUpTo64Bits()
[all …]
/freebsd-12.1/contrib/llvm/lib/Analysis/
H A DLint.cpp108 void visitXor(BinaryOperator &I);
109 void visitSub(BinaryOperator &I);
110 void visitLShr(BinaryOperator &I);
111 void visitAShr(BinaryOperator &I);
112 void visitShl(BinaryOperator &I);
113 void visitSDiv(BinaryOperator &I);
114 void visitUDiv(BinaryOperator &I);
115 void visitSRem(BinaryOperator &I);
116 void visitURem(BinaryOperator &I);
515 void Lint::visitXor(BinaryOperator &I) { in visitXor()
[all …]

12345678910