Home
last modified time | relevance | path

Searched refs:BinOp (Results 1 – 25 of 278) sorted by relevance

12345678910>>...12

/external/rust/crates/syn/src/
Dop.rs7 pub enum BinOp {
88 fn parse_binop(input: ParseStream) -> Result<BinOp> { in parse_binop() argument
90 input.parse().map(BinOp::And) in parse_binop()
92 input.parse().map(BinOp::Or) in parse_binop()
94 input.parse().map(BinOp::Shl) in parse_binop()
96 input.parse().map(BinOp::Shr) in parse_binop()
98 input.parse().map(BinOp::Eq) in parse_binop()
100 input.parse().map(BinOp::Le) in parse_binop()
102 input.parse().map(BinOp::Ne) in parse_binop()
104 input.parse().map(BinOp::Ge) in parse_binop()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/abseil/
DTimeSubtractionCheck.cpp131 const auto *BinOp = Result.Nodes.getNodeAs<BinaryOperator>("binop"); in check() local
134 if (InsideMacroDefinition(Result, BinOp->getSourceRange())) in check()
154 rewriteExprFromNumberToTime(Result, *Scale, BinOp->getLHS()) + " - " + in check()
155 rewriteExprFromNumberToTime(Result, *Scale, BinOp->getRHS()) + in check()
167 *BinOp, *Result.Context)); in check()
168 if (MaybeCallArg && MaybeCallArg->getArg(0)->IgnoreImpCasts() == BinOp && in check()
179 rewriteExprFromNumberToTime(Result, *Scale, BinOp->getLHS()) + in check()
181 rewriteExprFromNumberToTime(Result, *Scale, BinOp->getRHS()) + in check()
188 BinOp, in check()
191 "(" + rewriteExprFromNumberToTime(Result, *Scale, BinOp->getLHS()) + in check()
[all …]
/external/llvm-project/clang-tools-extra/clang-tidy/bugprone/
DStringIntegerAssignmentCheck.cpp54 if (const auto *BinOp = dyn_cast<BinaryOperator>(E)) { in isLikelyCharExpression() local
55 const auto *LHS = BinOp->getLHS()->IgnoreParenImpCasts(); in isLikelyCharExpression()
56 const auto *RHS = BinOp->getRHS()->IgnoreParenImpCasts(); in isLikelyCharExpression()
58 if (BinOp->isAdditiveOp() || BinOp->isBitwiseOp()) in isLikelyCharExpression()
59 return handleBinaryOp(BinOp->getOpcode(), LHS, RHS) || in isLikelyCharExpression()
60 handleBinaryOp(BinOp->getOpcode(), RHS, LHS); in isLikelyCharExpression()
62 if (BinOp->getOpcode() == BO_Rem) in isLikelyCharExpression()
63 return handleBinaryOp(BinOp->getOpcode(), LHS, RHS); in isLikelyCharExpression()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DCorrelatedValuePropagation.cpp492 static bool processBinOp(BinaryOperator *BinOp, LazyValueInfo *LVI);
523 BinaryOperator *BinOp = BinaryOperator::Create( in processSaturatingInst() local
525 BinOp->setDebugLoc(SI->getDebugLoc()); in processSaturatingInst()
526 setDeducedOverflowingFlags(BinOp, Opcode, NSW, NUW); in processSaturatingInst()
528 SI->replaceAllUsesWith(BinOp); in processSaturatingInst()
533 if (auto *BO = dyn_cast<BinaryOperator>(BinOp)) in processSaturatingInst()
651 if (auto *BinOp = dyn_cast<BinaryOperator>(BO)) in processUDivOrURem() local
652 if (BinOp->getOpcode() == Instruction::UDiv) in processUDivOrURem()
653 BinOp->setIsExact(Instr->isExact()); in processUDivOrURem()
741 static bool processBinOp(BinaryOperator *BinOp, LazyValueInfo *LVI) { in processBinOp() argument
[all …]
DLowerExpectIntrinsic.cpp132 BinaryOperator *BinOp = dyn_cast<BinaryOperator>(V); in handlePhiDef() local
133 if (!BinOp || BinOp->getOpcode() != Instruction::Xor) in handlePhiDef()
136 ConstantInt *CInt = dyn_cast<ConstantInt>(BinOp->getOperand(1)); in handlePhiDef()
140 V = BinOp->getOperand(0); in handlePhiDef()
141 Operations.push_back(BinOp); in handlePhiDef()
/external/llvm-project/clang/include/clang/Analysis/Analyses/
DThreadSafetyLogical.h54 class BinOp : public LExpr {
58 BinOp(LExpr *LHS, LExpr *RHS, Opcode Code) : LExpr(Code), LHS(LHS), RHS(RHS) {} in BinOp() function
68 class And : public BinOp {
70 And(LExpr *LHS, LExpr *RHS) : BinOp(LHS, RHS, LExpr::And) {} in And()
75 class Or : public BinOp {
77 Or(LExpr *LHS, LExpr *RHS) : BinOp(LHS, RHS, LExpr::Or) {} in Or()
/external/clang/include/clang/Analysis/Analyses/
DThreadSafetyLogical.h55 class BinOp : public LExpr {
59 BinOp(LExpr *LHS, LExpr *RHS, Opcode Code) : LExpr(Code), LHS(LHS), RHS(RHS) {} in BinOp() function
69 class And : public BinOp {
71 And(LExpr *LHS, LExpr *RHS) : BinOp(LHS, RHS, LExpr::And) {} in And()
76 class Or : public BinOp {
78 Or(LExpr *LHS, LExpr *RHS) : BinOp(LHS, RHS, LExpr::Or) {} in Or()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/X86/
DX86LegalizerInfo.cpp74 for (unsigned BinOp : {G_SUB, G_MUL, G_AND, G_OR, G_XOR}) in X86LegalizerInfo()
75 setLegalizeScalarToDifferentSizeStrategy(BinOp, 0, widen_1); in X86LegalizerInfo()
122 for (unsigned BinOp : {G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR}) in setLegalizerInfo32bit()
124 setAction({BinOp, Ty}, Legal); in setLegalizerInfo32bit()
219 for (unsigned BinOp : {G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR}) in setLegalizerInfo64bit()
220 setAction({BinOp, s64}, Legal); in setLegalizerInfo64bit()
293 for (unsigned BinOp : {G_FADD, G_FSUB, G_FMUL, G_FDIV}) in setLegalizerInfoSSE1()
295 setAction({BinOp, Ty}, Legal); in setLegalizerInfoSSE1()
329 for (unsigned BinOp : {G_FADD, G_FSUB, G_FMUL, G_FDIV}) in setLegalizerInfoSSE2()
331 setAction({BinOp, Ty}, Legal); in setLegalizerInfoSSE2()
[all …]
/external/llvm-project/llvm/lib/Target/X86/
DX86LegalizerInfo.cpp79 for (unsigned BinOp : {G_SUB, G_MUL, G_AND, G_OR, G_XOR}) in X86LegalizerInfo()
80 setLegalizeScalarToDifferentSizeStrategy(BinOp, 0, widen_1); in X86LegalizerInfo()
116 for (unsigned BinOp : {G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR}) in setLegalizerInfo32bit()
118 setAction({BinOp, Ty}, Legal); in setLegalizerInfo32bit()
212 for (unsigned BinOp : {G_ADD, G_SUB, G_MUL, G_AND, G_OR, G_XOR}) in setLegalizerInfo64bit()
213 setAction({BinOp, s64}, Legal); in setLegalizerInfo64bit()
288 for (unsigned BinOp : {G_FADD, G_FSUB, G_FMUL, G_FDIV}) in setLegalizerInfoSSE1()
290 setAction({BinOp, Ty}, Legal); in setLegalizerInfoSSE1()
324 for (unsigned BinOp : {G_FADD, G_FSUB, G_FMUL, G_FDIV}) in setLegalizerInfoSSE2()
326 setAction({BinOp, Ty}, Legal); in setLegalizerInfoSSE2()
[all …]
/external/llvm-project/llvm/lib/Transforms/Scalar/
DCorrelatedValuePropagation.cpp480 static bool processBinOp(BinaryOperator *BinOp, LazyValueInfo *LVI);
511 BinaryOperator *BinOp = BinaryOperator::Create( in processSaturatingInst() local
513 BinOp->setDebugLoc(SI->getDebugLoc()); in processSaturatingInst()
514 setDeducedOverflowingFlags(BinOp, Opcode, NSW, NUW); in processSaturatingInst()
516 SI->replaceAllUsesWith(BinOp); in processSaturatingInst()
521 if (auto *BO = dyn_cast<BinaryOperator>(BinOp)) in processSaturatingInst()
663 if (auto *BinOp = dyn_cast<BinaryOperator>(BO)) in narrowSDivOrSRem() local
664 if (BinOp->getOpcode() == Instruction::SDiv) in narrowSDivOrSRem()
665 BinOp->setIsExact(Instr->isExact()); in narrowSDivOrSRem()
707 if (auto *BinOp = dyn_cast<BinaryOperator>(BO)) in processUDivOrURem() local
[all …]
DLowerExpectIntrinsic.cpp150 BinaryOperator *BinOp = dyn_cast<BinaryOperator>(V); in handlePhiDef() local
151 if (!BinOp || BinOp->getOpcode() != Instruction::Xor) in handlePhiDef()
154 ConstantInt *CInt = dyn_cast<ConstantInt>(BinOp->getOperand(1)); in handlePhiDef()
158 V = BinOp->getOperand(0); in handlePhiDef()
159 Operations.push_back(BinOp); in handlePhiDef()
/external/llvm-project/llvm/lib/Target/RISCV/
DRISCVExpandAtomicPseudoInsts.cpp51 MachineBasicBlock::iterator MBBI, AtomicRMWInst::BinOp,
56 AtomicRMWInst::BinOp, bool IsMasked, int Width,
220 AtomicRMWInst::BinOp BinOp, int Width) { in doAtomicBinOpExpansion() argument
235 switch (BinOp) { in doAtomicBinOpExpansion()
281 MachineBasicBlock *DoneMBB, AtomicRMWInst::BinOp BinOp, int Width) { in doMaskedAtomicBinOpExpansion() argument
301 switch (BinOp) { in doMaskedAtomicBinOpExpansion()
343 AtomicRMWInst::BinOp BinOp, bool IsMasked, int Width, in expandAtomicBinOp() argument
364 doAtomicBinOpExpansion(TII, MI, DL, &MBB, LoopMBB, DoneMBB, BinOp, Width); in expandAtomicBinOp()
366 doMaskedAtomicBinOpExpansion(TII, MI, DL, &MBB, LoopMBB, DoneMBB, BinOp, in expandAtomicBinOp()
392 AtomicRMWInst::BinOp BinOp, bool IsMasked, int Width, in expandAtomicMinMaxOp() argument
[all …]
/external/llvm-project/clang/lib/Analysis/
DThreadSafetyLogical.cpp23 const auto LeftAndOperator = [=](const BinOp *A) { in implies()
27 const auto RightAndOperator = [=](const BinOp *A) { in implies()
33 const auto LeftOrOperator = [=](const BinOp *A) { in implies()
37 const auto RightOrOperator = [=](const BinOp *A) { in implies()
DConsumed.cpp500 void VisitBinaryOperator(const BinaryOperator *BinOp);
701 void ConsumedStmtVisitor::VisitBinaryOperator(const BinaryOperator *BinOp) { in VisitBinaryOperator() argument
702 switch (BinOp->getOpcode()) { in VisitBinaryOperator()
705 InfoEntry LEntry = findInfo(BinOp->getLHS()), in VisitBinaryOperator()
706 REntry = findInfo(BinOp->getRHS()); in VisitBinaryOperator()
725 PropagationMap.insert(PairType(BinOp, PropagationInfo(BinOp, in VisitBinaryOperator()
726 static_cast<EffectiveOp>(BinOp->getOpcode() == BO_LOr), LTest, RTest))); in VisitBinaryOperator()
732 forwardInfo(BinOp->getLHS(), BinOp); in VisitBinaryOperator()
1254 } else if (const auto *BinOp = in splitState() local
1256 PInfo = Visitor.getInfo(BinOp->getLHS()); in splitState()
[all …]
/external/clang/lib/Analysis/
DThreadSafetyLogical.cpp24 const auto LeftAndOperator = [=](const BinOp *A) { in implies()
28 const auto RightAndOperator = [=](const BinOp *A) { in implies()
34 const auto LeftOrOperator = [=](const BinOp *A) { in implies()
38 const auto RightOrOperator = [=](const BinOp *A) { in implies()
/external/llvm/lib/Analysis/
DCostModel.cpp158 static bool matchPairwiseReductionAtLevel(const BinaryOperator *BinOp, in matchPairwiseReductionAtLevel() argument
166 if (BinOp == nullptr) in matchPairwiseReductionAtLevel()
169 assert(BinOp->getType()->isVectorTy() && "Expecting a vector type"); in matchPairwiseReductionAtLevel()
171 unsigned Opcode = BinOp->getOpcode(); in matchPairwiseReductionAtLevel()
172 Value *L = BinOp->getOperand(0); in matchPairwiseReductionAtLevel()
173 Value *R = BinOp->getOperand(1); in matchPairwiseReductionAtLevel()
342 BinaryOperator *BinOp; in matchVectorSplittingReduction() local
343 if (!(BinOp = dyn_cast<BinaryOperator>(RdxOp))) in matchVectorSplittingReduction()
345 if (BinOp->getOpcode() != RdxOpcode) in matchVectorSplittingReduction()
350 std::tie(NextRdxOp, Shuffle) = getShuffleAndOtherOprd(BinOp); in matchVectorSplittingReduction()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/RISCV/
DRISCVExpandPseudoInsts.cpp47 MachineBasicBlock::iterator MBBI, AtomicRMWInst::BinOp,
52 AtomicRMWInst::BinOp, bool IsMasked, int Width,
237 AtomicRMWInst::BinOp BinOp, int Width) { in doAtomicBinOpExpansion() argument
252 switch (BinOp) { in doAtomicBinOpExpansion()
298 MachineBasicBlock *DoneMBB, AtomicRMWInst::BinOp BinOp, int Width) { in doMaskedAtomicBinOpExpansion() argument
318 switch (BinOp) { in doMaskedAtomicBinOpExpansion()
360 AtomicRMWInst::BinOp BinOp, bool IsMasked, int Width, in expandAtomicBinOp() argument
381 doAtomicBinOpExpansion(TII, MI, DL, &MBB, LoopMBB, DoneMBB, BinOp, Width); in expandAtomicBinOp()
383 doMaskedAtomicBinOpExpansion(TII, MI, DL, &MBB, LoopMBB, DoneMBB, BinOp, in expandAtomicBinOp()
409 AtomicRMWInst::BinOp BinOp, bool IsMasked, int Width, in expandAtomicMinMaxOp() argument
[all …]
/external/llvm/lib/Target/AArch64/
DAArch64AddressTypePromotion.cpp160 const BinaryOperator *BinOp = dyn_cast<BinaryOperator>(Inst); in canGetThrough() local
161 if (BinOp && isa<OverflowingBinaryOperator>(BinOp) && in canGetThrough()
162 (BinOp->hasNoUnsignedWrap() || BinOp->hasNoSignedWrap())) in canGetThrough()
454 const BinaryOperator *BinOp = dyn_cast<BinaryOperator>(Inst); in analyzeSExtension() local
455 if (BinOp && isa<ConstantInt>(BinOp->getOperand(0))) in analyzeSExtension()
/external/python/cpython2/Lib/test/
Dtest_ast.py305 x = ast.BinOp()
315 x = ast.BinOp(n1, addop, n3)
320 x = ast.BinOp(1, 2, 3)
325 x = ast.BinOp(1, 2, 3, lineno=0)
332 self.assertRaises(TypeError, ast.BinOp, 1, 2)
334 self.assertRaises(TypeError, ast.BinOp, 1, 2, 3, 4)
336 self.assertRaises(TypeError, ast.BinOp, 1, 2, lineno=0)
338 self.assertRaises(TypeError, ast.BinOp, 1, 2, 3, 4, lineno=0)
341 x = ast.BinOp(left=1, op=2, right=3, lineno=0)
348 x = ast.BinOp(1, 2, 3, foobarbaz=42)
/external/rust/crates/syn/src/gen/
Deq.rs79 impl Eq for BinOp {} implementation
82 impl PartialEq for BinOp { implementation
85 (BinOp::Add(_), BinOp::Add(_)) => true, in eq()
86 (BinOp::Sub(_), BinOp::Sub(_)) => true, in eq()
87 (BinOp::Mul(_), BinOp::Mul(_)) => true, in eq()
88 (BinOp::Div(_), BinOp::Div(_)) => true, in eq()
89 (BinOp::Rem(_), BinOp::Rem(_)) => true, in eq()
90 (BinOp::And(_), BinOp::And(_)) => true, in eq()
91 (BinOp::Or(_), BinOp::Or(_)) => true, in eq()
92 (BinOp::BitXor(_), BinOp::BitXor(_)) => true, in eq()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DPredicateInfo.cpp378 } else if (auto *BinOp = dyn_cast<BinaryOperator>(Cond)) { in processAssume() local
380 assert(BinOp->getOpcode() == Instruction::And && in processAssume()
382 auto *PA = new PredicateAssume(BinOp, II, BinOp); in processAssume()
383 addInfoFor(OpsToRename, BinOp, PA); in processAssume()
429 auto *BinOp = cast<BinaryOperator>(BI->getCondition()); in processBranch() local
430 if (BinOp->getOpcode() == Instruction::And) in processBranch()
432 else if (BinOp->getOpcode() == Instruction::Or) in processBranch()
434 ConditionsToProcess.push_back(BinOp->getOperand(0)); in processBranch()
435 ConditionsToProcess.push_back(BinOp->getOperand(1)); in processBranch()
446 } else if (auto *BinOp = dyn_cast<BinaryOperator>(Cond)) { in processBranch() local
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/WebAssembly/MCTargetDesc/
DWebAssemblyWasmObjectWriter.cpp53 if (auto BinOp = dyn_cast<MCBinaryExpr>(Expr)) { in getFixupSection() local
54 auto SectionLHS = getFixupSection(BinOp->getLHS()); in getFixupSection()
55 auto SectionRHS = getFixupSection(BinOp->getRHS()); in getFixupSection()
/external/llvm-project/llvm/lib/Transforms/Utils/
DPredicateInfo.cpp427 } else if (auto *BinOp = dyn_cast<BinaryOperator>(Cond)) { in processAssume() local
429 assert(BinOp->getOpcode() == Instruction::And && in processAssume()
431 auto *PA = new PredicateAssume(BinOp, II, BinOp); in processAssume()
432 addInfoFor(OpsToRename, BinOp, PA); in processAssume()
479 auto *BinOp = cast<BinaryOperator>(BI->getCondition()); in processBranch() local
480 if (BinOp->getOpcode() == Instruction::And) in processBranch()
482 else if (BinOp->getOpcode() == Instruction::Or) in processBranch()
484 ConditionsToProcess.push_back(BinOp->getOperand(0)); in processBranch()
485 ConditionsToProcess.push_back(BinOp->getOperand(1)); in processBranch()
496 } else if (auto *BinOp = dyn_cast<BinaryOperator>(Cond)) { in processBranch() local
[all …]
/external/llvm-project/llvm/lib/Target/AMDGPU/
DAMDGPUAtomicOptimizer.cpp35 AtomicRMWInst::BinOp Op;
50 Value *buildScan(IRBuilder<> &B, AtomicRMWInst::BinOp Op, Value *V,
53 void optimizeAtomic(Instruction &I, AtomicRMWInst::BinOp Op, unsigned ValIdx,
117 AtomicRMWInst::BinOp Op = I.getOperation(); in visitAtomicRMWInst()
163 AtomicRMWInst::BinOp Op; in visitIntrinsicInst()
246 static Value *buildNonAtomicBinOp(IRBuilder<> &B, AtomicRMWInst::BinOp Op, in buildNonAtomicBinOp()
283 Value *AMDGPUAtomicOptimizer::buildScan(IRBuilder<> &B, AtomicRMWInst::BinOp Op, in buildScan()
386 static APInt getIdentityValueForAtomicOp(AtomicRMWInst::BinOp Op, in getIdentityValueForAtomicOp()
413 AtomicRMWInst::BinOp Op, in optimizeAtomic()
489 const AtomicRMWInst::BinOp ScanOp = in optimizeAtomic()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Target/AMDGPU/
DAMDGPUAtomicOptimizer.cpp35 AtomicRMWInst::BinOp Op;
50 Value *buildScan(IRBuilder<> &B, AtomicRMWInst::BinOp Op, Value *V,
53 void optimizeAtomic(Instruction &I, AtomicRMWInst::BinOp Op, unsigned ValIdx,
117 AtomicRMWInst::BinOp Op = I.getOperation(); in visitAtomicRMWInst()
163 AtomicRMWInst::BinOp Op; in visitIntrinsicInst()
246 static Value *buildNonAtomicBinOp(IRBuilder<> &B, AtomicRMWInst::BinOp Op, in buildNonAtomicBinOp()
283 Value *AMDGPUAtomicOptimizer::buildScan(IRBuilder<> &B, AtomicRMWInst::BinOp Op, in buildScan()
386 static APInt getIdentityValueForAtomicOp(AtomicRMWInst::BinOp Op, in getIdentityValueForAtomicOp()
408 AtomicRMWInst::BinOp Op, in optimizeAtomic()
485 const AtomicRMWInst::BinOp ScanOp = in optimizeAtomic()

12345678910>>...12