Home
last modified time | relevance | path

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

12345678910>>...12

/freebsd-14.2/contrib/llvm-project/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-14.2/contrib/llvm-project/llvm/lib/Transforms/InstCombine/
H A DInstCombineInternal.h94 Instruction *visitAdd(BinaryOperator &I);
95 Instruction *visitFAdd(BinaryOperator &I);
98 Instruction *visitSub(BinaryOperator &I);
99 Instruction *visitFSub(BinaryOperator &I);
100 Instruction *visitMul(BinaryOperator &I);
113 Instruction *visitAnd(BinaryOperator &I);
114 Instruction *visitOr(BinaryOperator &I);
117 Instruction *visitXor(BinaryOperator &I);
118 Instruction *visitShl(BinaryOperator &I);
123 BinaryOperator &I);
[all …]
H A DInstCombineMulDivRem.cpp66 BinaryOperator *I = dyn_cast<BinaryOperator>(V); in simplifyValueKnownNonZero()
165 BinaryOperator *Shift; in foldMulShl1()
231 BinaryOperator *Mul = cast<BinaryOperator>(I.getOperand(0)); in visitMul()
232 BinaryOperator *BO = BinaryOperator::CreateMul(NewOp, Shl); in visitMul()
243 BinaryOperator *Shl = BinaryOperator::CreateShl(NewOp, NewCst); in visitMul()
377 BinaryOperator *Div = dyn_cast<BinaryOperator>(Op0); in visitMul()
381 Div = dyn_cast<BinaryOperator>(Op1); in visitMul()
512 BinaryOperator *Shl = BinaryOperator::CreateShl(Op1, Res); in visitMul()
521 BinaryOperator *Shl = BinaryOperator::CreateShl(Op0, Res); in visitMul()
833 BinaryOperator *Result = BinaryOperator::CreateFMulFMF(X, Y, &I); in visitFMul()
[all …]
H A DInstCombineAddSub.cpp887 BinaryOperator *Res = in foldAddWithConstant()
1261 return BinaryOperator::CreateAShr( in foldAddToAshr()
1267 BinaryOperator &I) { in canonicalizeCondSignextOfHighBitExtractToSignextHighBitExtract()
1681 return BinaryOperator::CreateSub( in visitAdd()
1982 BinaryOperator *Result = BinaryOperator::CreateFAddFMF(X, Y, &I); in visitFAdd()
2136 BinaryOperator *Res = BinaryOperator::CreateAdd(Op0, V); in visitSub()
2165 BinaryOperator *Res = in visitSub()
2247 BinaryOperator *Sub = BinaryOperator::CreateSub(X, Add); in visitSub()
2347 BinaryOperator *InnerSub; in visitSub()
2428 return BinaryOperator::CreateAnd( in visitSub()
[all …]
H A DInstCombineShifts.cpp59 BinaryOperator *Sh0, const SimplifyQuery &SQ, in reassociateShiftAmtsOfTwoSameDirectionShifts()
147 BinaryOperator *NewShift = BinaryOperator::Create(ShiftOpcode, X, NewShAmt); in reassociateShiftAmtsOfTwoSameDirectionShifts()
475 BinaryOperator *NewShiftOp = in commonShiftTransforms()
764 return BinaryOperator::Create( in FoldShiftByConstant()
839 BinaryOperator *TBO; in FoldShiftByConstant()
856 BinaryOperator *FBO; in FoldShiftByConstant()
1097 BinaryOperator *Shr; in visitShl()
1140 BinaryOperator *Op0BO; in visitShl()
1220 return BinaryOperator::CreateLShr( in visitShl()
1497 BinaryOperator &OldAShr) { in foldVariableSignZeroExtensionOfVariableHighBitExtract()
[all …]
H A DInstCombineAndOrXor.cpp1512 BinaryOperator &I) { in canonicalizeConditionalNegationViaMathToSelect()
1993 return BinaryOperator::Create( in foldComplexAndOrPatterns()
2001 return BinaryOperator::Create( in foldComplexAndOrPatterns()
2320 BinaryOperator *BO; in visitAnd()
2371 BinaryOperator::BinaryOps BinOp = cast<BinaryOperator>(Op0)->getOpcode(); in visitAnd()
2746 if (isa<BinaryOperator>(Or0) && isa<BinaryOperator>(Or1)) { in matchFunnelShift()
3615 if (BinaryOperator *B = dyn_cast<BinaryOperator>(A)) in visitOr()
3850 return BinaryOperator::CreateOr( in visitOr()
3862 return BinaryOperator::CreateOr( in visitOr()
4352 BinaryOperator *NotVal; in foldNot()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/Transforms/Utils/
H A DIntegerDivision.h20 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);
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/IR/
H A DInstruction.def147 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 DInstrTypes.h187 class BinaryOperator : public Instruction {
199 BinaryOperator *cloneImpl() const;
247 static BinaryOperator *
284 BinaryOperator *BO = Create(Opc, V1, V2, Name);
303 BinaryOperator *BO = Create(Opc, V1, V2, Name);
339 static inline BinaryOperator *
423 struct OperandTraits<BinaryOperator> :
452 BinaryOperator *BinaryOperator::CreateDisjoint(BinaryOps Opc, Value *V1,
454 BinaryOperator *BO = Create(Opc, V1, V2, Name);
458 BinaryOperator *BinaryOperator::CreateDisjoint(BinaryOps Opc, Value *V1,
[all …]
/freebsd-14.2/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DIdenticalExprChecker.cpp48 bool VisitBinaryOperator(const BinaryOperator *B);
53 void reportIdenticalExpr(const BinaryOperator *B, bool CheckBitwise,
56 void checkComparisonOp(const BinaryOperator *B);
88 while (const BinaryOperator *B2 = dyn_cast<BinaryOperator>(LHS)) { in checkBitwiseOrLogicalOp()
182 BinaryOperator::Opcode Op = B->getOpcode(); in VisitBinaryOperator()
184 if (BinaryOperator::isBitwiseOp(Op)) in VisitBinaryOperator()
187 if (BinaryOperator::isLogicalOp(Op)) in VisitBinaryOperator()
190 if (BinaryOperator::isComparisonOp(Op)) in VisitBinaryOperator()
200 BinaryOperator::Opcode Op = B->getOpcode(); in checkComparisonOp()
452 const BinaryOperator *BinOp1 = cast<BinaryOperator>(Stmt1); in isIdenticalStmt()
[all …]
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()
196 void TestAfterDivZeroChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
198 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt()
210 if (const BinaryOperator *B = dyn_cast<BinaryOperator>(Condition)) { in checkBranchCondition()
H A DUndefResultChecker.cpp29 : public Checker< check::PostStmt<BinaryOperator> > {
34 void checkPostStmt(const BinaryOperator *B, CheckerContext &C) const;
61 void UndefResultChecker::checkPostStmt(const BinaryOperator *B, in checkPostStmt()
93 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt()
100 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt()
H A DMallocOverflowSecurityChecker.cpp37 const BinaryOperator *mulop;
41 MallocOverflowCheck(const CallExpr *call, const BinaryOperator *m, in MallocOverflowCheck()
77 const BinaryOperator * mulop = nullptr; in CheckMallocArgument()
83 if (const BinaryOperator *binop = dyn_cast<BinaryOperator>(e)) { in CheckMallocArgument()
177 void CheckAssignmentExpr(BinaryOperator *AssignEx) { in CheckAssignmentExpr()
192 if (const BinaryOperator *BOp = dyn_cast<BinaryOperator>(rhse)) { in CheckAssignmentExpr()
229 void VisitBinaryOperator(BinaryOperator *E) { in VisitBinaryOperator()
H A DDivZeroChecker.cpp28 class DivZeroChecker : public Checker< check::PreStmt<BinaryOperator> > {
38 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const;
44 if (const auto *BE = dyn_cast<BinaryOperator>(S)) in getDenomExpr()
70 void DivZeroChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
72 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt()
H A DBitwiseShiftChecker.cpp56 const BinaryOperator *const Op;
67 BitwiseShiftValidator(const BinaryOperator *O, CheckerContext &C, in BitwiseShiftValidator()
83 bool assumeRequirement(OperandSide Side, BinaryOperator::Opcode Cmp, unsigned Limit);
85 void recordAssumption(OperandSide Side, BinaryOperator::Opcode Cmp, unsigned Limit);
138 BinaryOperator::Opcode Comparison, in assumeRequirement()
299 BinaryOperator::Opcode Comparison, in recordAssumption()
346 class BitwiseShiftChecker : public Checker<check::PreStmt<BinaryOperator>> {
350 void checkPreStmt(const BinaryOperator *B, CheckerContext &Ctx) const { in checkPreStmt()
351 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt()
/freebsd-14.2/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DRangedConstraintManager.cpp36 BinaryOperator::Opcode op = SIE->getOpcode(); in assumeSym()
37 if (BinaryOperator::isComparisonOp(op) && op != BO_Cmp) { in assumeSym()
39 op = BinaryOperator::negateComparisonOp(op); in assumeSym()
50 BinaryOperator::Opcode Op = SSE->getOpcode(); in assumeSym()
51 if (BinaryOperator::isComparisonOp(Op)) { in assumeSym()
69 Op = BinaryOperator::reverseComparisonOp(Op); in assumeSym()
71 Op = BinaryOperator::negateComparisonOp(Op); in assumeSym()
75 if (BinaryOperator::isEqualityOp(Op)) { in assumeSym()
156 assert(BinaryOperator::isComparisonOp(Op) && in assumeSymRel()
166 if (BinaryOperator::isComparisonOp(SE->getOpcode())) in assumeSymRel()
[all …]
H A DSimpleSValBuilder.cpp197 if (BinaryOperator::isComparisonOp(op)) { in MakeSymIntVal()
309 if (BinaryOperator::isComparisonOp(Op)) in doRearrangeUnchecked()
311 else if (BinaryOperator::isAdditiveOp(Op)) in doRearrangeUnchecked()
322 BinaryOperator::Opcode ResultOp; in doRearrangeUnchecked()
324 if (BinaryOperator::isComparisonOp(Op)) { in doRearrangeUnchecked()
361 (!BinaryOperator::isComparisonOp(Op) || in shouldRearrange()
385 if (BinaryOperator::isComparisonOp(Op)) { in tryRearrange()
390 } else if (BinaryOperator::isAdditiveOp(Op)) { in tryRearrange()
486 if (!BinaryOperator::isComparisonOp(op)) in evalBinOpNN()
727 if (!BinaryOperator::isComparisonOp(op)) in evalBinOpFieldRegionFieldRegion()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/include/llvm/Transforms/Scalar/
H A DNaryReassociate.h89 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 DReassociate.h36 class BinaryOperator; variable
103 void ReassociateExpression(BinaryOperator *I);
104 void RewriteExprTree(BinaryOperator *I,
107 Value *OptimizeExpression(BinaryOperator *I,
120 Value *OptimizeMul(BinaryOperator *I,
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Scalar/
H A DReassociate.cpp253 BinaryOperator *Res = in CreateAdd()
265 BinaryOperator *Res = in CreateMul()
615 if (BinaryOperator *UserBO = dyn_cast<BinaryOperator>(U)) in LinearizeExprTree()
681 BinaryOperator *Op = I; in RewriteExprTree()
888 if (BinaryOperator *I = in NegateValue()
1047 BinaryOperator *New = in convertOrWithNoCommonBitsToAdd()
1120 BinaryOperator *Mul = in ConvertShiftToMul()
1673 BinaryOperator *BOp = in OptimizeAdd()
2299 if (BinaryOperator *Tmp = dyn_cast<BinaryOperator>(U)) in OptimizeInst()
2326 if (BinaryOperator *Tmp = dyn_cast<BinaryOperator>(U)) in OptimizeInst()
[all …]
H A DCorrelatedValuePropagation.cpp479 static bool processBinOp(BinaryOperator *BinOp, LazyValueInfo *LVI);
513 if (auto *BO = dyn_cast<BinaryOperator>(NegX)) in processAbsIntrinsic()
565 if (auto *BO = dyn_cast<BinaryOperator>(NewOp)) in processOverflowIntrinsic()
575 BinaryOperator *BinOp = BinaryOperator::Create( in processSaturatingInst()
585 if (auto *BO = dyn_cast<BinaryOperator>(BinOp)) in processSaturatingInst()
719 if (auto *BinOp = dyn_cast<BinaryOperator>(BO)) in narrowSDivOrSRem()
838 if (auto *BinOp = dyn_cast<BinaryOperator>(BO)) in narrowUDivOrURem()
1003 static bool processAShr(BinaryOperator *SDI, LazyValueInfo *LVI) { in processAShr()
1172 BBChanged |= processAShr(cast<BinaryOperator>(&II), LVI); in runImpl()
1184 BBChanged |= processBinOp(cast<BinaryOperator>(&II), LVI); in runImpl()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Transforms/Utils/
H A DIntegerDivision.cpp354 bool llvm::expandRemainder(BinaryOperator *Rem) { in expandRemainder()
380 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandRemainder()
393 if (BinaryOperator *UDiv = dyn_cast<BinaryOperator>(Builder.GetInsertPoint())) { in expandRemainder()
407 bool llvm::expandDivision(BinaryOperator *Div) { in expandDivision()
434 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandDivision()
497 return expandRemainder(cast<BinaryOperator>(ExtRem)); in expandRemainderUpTo32Bits()
543 return expandRemainder(cast<BinaryOperator>(ExtRem)); in expandRemainderUpTo64Bits()
552 bool llvm::expandDivisionUpTo32Bits(BinaryOperator *Div) { in expandDivisionUpTo32Bits()
592 return expandDivision(cast<BinaryOperator>(ExtDiv)); in expandDivisionUpTo32Bits()
600 bool llvm::expandDivisionUpTo64Bits(BinaryOperator *Div) { in expandDivisionUpTo64Bits()
[all …]
/freebsd-14.2/contrib/llvm-project/llvm/lib/Analysis/
H A DLint.cpp100 void visitXor(BinaryOperator &I);
101 void visitSub(BinaryOperator &I);
102 void visitLShr(BinaryOperator &I);
103 void visitAShr(BinaryOperator &I);
104 void visitShl(BinaryOperator &I);
105 void visitSDiv(BinaryOperator &I);
106 void visitUDiv(BinaryOperator &I);
107 void visitSRem(BinaryOperator &I);
108 void visitURem(BinaryOperator &I);
495 void Lint::visitXor(BinaryOperator &I) { in visitXor()
[all …]
H A DPHITransAddr.cpp245 bool isNSW = cast<BinaryOperator>(Inst)->hasNoSignedWrap(); in translateSubExpr()
246 bool isNUW = cast<BinaryOperator>(Inst)->hasNoUnsignedWrap(); in translateSubExpr()
252 if (BinaryOperator *BOp = dyn_cast<BinaryOperator>(LHS)) in translateSubExpr()
280 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U)) in translateSubExpr()
411 BinaryOperator *Res = BinaryOperator::CreateAdd(OpVal, Inst->getOperand(1), in insertTranslatedSubExpr()
414 Res->setHasNoSignedWrap(cast<BinaryOperator>(Inst)->hasNoSignedWrap()); in insertTranslatedSubExpr()
415 Res->setHasNoUnsignedWrap(cast<BinaryOperator>(Inst)->hasNoUnsignedWrap()); in insertTranslatedSubExpr()
/freebsd-14.2/contrib/llvm-project/clang/lib/ARCMigrate/
H A DTransZeroOutPropsInDealloc.cpp90 bool VisitBinaryOperator(BinaryOperator *BOE) { in VisitBinaryOperator()
151 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) in isZeroingPropIvar()
158 bool isZeroingPropIvar(BinaryOperator *BOE) { in isZeroingPropIvar()
191 BinaryOperator *BO = dyn_cast<BinaryOperator>(PO->getSyntacticForm()); in isZeroingPropIvar()

12345678910>>...12