/external/llvm/lib/Transforms/Scalar/ |
D | SeparateConstOffsetFromGEP.cpp | 153 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended, 207 bool CanTraceInto(bool SignExtended, bool ZeroExtended, BinaryOperator *BO, 315 BinaryOperator *BO, in CanTraceInto() argument 320 if (BO->getOpcode() != Instruction::Add && in CanTraceInto() 321 BO->getOpcode() != Instruction::Sub && in CanTraceInto() 322 BO->getOpcode() != Instruction::Or) { in CanTraceInto() 326 Value *LHS = BO->getOperand(0), *RHS = BO->getOperand(1); in CanTraceInto() 329 if (BO->getOpcode() == Instruction::Or && !NoCommonBits(LHS, RHS)) in CanTraceInto() 343 if (BO->getOpcode() == Instruction::Add && !ZeroExtended && NonNegative) { in CanTraceInto() 364 if (BO->getOpcode() == Instruction::Add || in CanTraceInto() [all …]
|
D | Reassociate.cpp | 554 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() local 557 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree() 593 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() 595 Worklist.push_back(std::make_pair(BO, It->second)); in LinearizeExprTree() 622 BinaryOperator *BO = dyn_cast<BinaryOperator>(Op); in LinearizeExprTree() local 623 if (Opcode == Instruction::Mul && BO && BinaryOperator::isNeg(BO)) { in LinearizeExprTree() 625 BO = LowerNegateToMultiply(BO); in LinearizeExprTree() 626 DEBUG(dbgs() << *BO << 'n'); in LinearizeExprTree() 627 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree() 738 BinaryOperator *BO = isReassociableOp(OldLHS, Opcode); in RewriteExprTree() local [all …]
|
D | JumpThreading.cpp | 131 bool ProcessBranchOnXOR(BinaryOperator *BO); 474 } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(I)) { in ComputeValueKnownInPredecessors() local 477 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->getOperand(1))) { in ComputeValueKnownInPredecessors() 479 ComputeValueKnownInPredecessors(BO->getOperand(0), BB, LHSVals, in ComputeValueKnownInPredecessors() 485 Constant *Folded = ConstantExpr::get(BO->getOpcode(), V, CI); in ComputeValueKnownInPredecessors() 1226 bool JumpThreading::ProcessBranchOnXOR(BinaryOperator *BO) { in ProcessBranchOnXOR() argument 1227 BasicBlock *BB = BO->getParent(); in ProcessBranchOnXOR() 1231 if (isa<ConstantInt>(BO->getOperand(0)) || in ProcessBranchOnXOR() 1232 isa<ConstantInt>(BO->getOperand(1))) in ProcessBranchOnXOR() 1260 if (!ComputeValueKnownInPredecessors(BO->getOperand(0), BB, XorOpValues, in ProcessBranchOnXOR() [all …]
|
/external/llvm/include/llvm/IR/ |
D | NoFolder.h | 42 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS); 43 if (HasNUW) BO->setHasNoUnsignedWrap(); 44 if (HasNSW) BO->setHasNoSignedWrap(); 45 return BO; 58 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS); 59 if (HasNUW) BO->setHasNoUnsignedWrap(); 60 if (HasNSW) BO->setHasNoSignedWrap(); 61 return BO; 74 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS); 75 if (HasNUW) BO->setHasNoUnsignedWrap(); [all …]
|
D | InstrTypes.h | 196 BinaryOperator *BO = Create(Opc, V1, V2, Name); 197 BO->setHasNoSignedWrap(true); 198 return BO; 202 BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); 203 BO->setHasNoSignedWrap(true); 204 return BO; 208 BinaryOperator *BO = Create(Opc, V1, V2, Name, I); 209 BO->setHasNoSignedWrap(true); 210 return BO; 215 BinaryOperator *BO = Create(Opc, V1, V2, Name); [all …]
|
/external/clang/lib/Analysis/ |
D | ThreadSafetyCommon.cpp | 268 const BinaryOperator *BO, in translateBinOp() argument 270 til::SExpr *E0 = translate(BO->getLHS(), Ctx); in translateBinOp() 271 til::SExpr *E1 = translate(BO->getRHS(), Ctx); in translateBinOp() 280 const BinaryOperator *BO, in translateBinAssign() argument 283 const Expr *LHS = BO->getLHS(); in translateBinAssign() 284 const Expr *RHS = BO->getRHS(); in translateBinAssign() 306 til::SExpr *SExprBuilder::translateBinaryOperator(const BinaryOperator *BO, in translateBinaryOperator() argument 308 switch (BO->getOpcode()) { in translateBinaryOperator() 311 return new (Arena) til::Undefined(BO); in translateBinaryOperator() 313 case BO_Mul: return translateBinOp(til::BOP_Mul, BO, Ctx); in translateBinaryOperator() [all …]
|
D | PseudoConstantAnalysis.cpp | 94 const BinaryOperator *BO = cast<BinaryOperator>(Head); in RunAnalysis() local 96 const Decl *LHSDecl = getDecl(BO->getLHS()->IgnoreParenCasts()); in RunAnalysis() 103 switch (BO->getOpcode()) { in RunAnalysis() 107 const Decl *RHSDecl = getDecl(BO->getRHS()->IgnoreParenCasts()); in RunAnalysis()
|
D | UninitializedValues.cpp | 328 void VisitBinaryOperator(BinaryOperator *BO); 384 void ClassifyRefs::VisitBinaryOperator(BinaryOperator *BO) { in VisitBinaryOperator() argument 390 if (BO->isCompoundAssignmentOp()) in VisitBinaryOperator() 391 classify(BO->getLHS(), Use); in VisitBinaryOperator() 392 else if (BO->getOpcode() == BO_Assign) in VisitBinaryOperator() 393 classify(BO->getLHS(), Ignore); in VisitBinaryOperator() 686 void TransferFunctions::VisitBinaryOperator(BinaryOperator *BO) { in VisitBinaryOperator() argument 687 if (BO->getOpcode() == BO_Assign) { in VisitBinaryOperator() 688 FindVarResult Var = findVar(BO->getLHS()); in VisitBinaryOperator()
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineShifts.cpp | 214 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue() local 215 unsigned TypeWidth = BO->getType()->getScalarSizeInBits(); in GetShiftedValue() 218 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); in GetShiftedValue() 227 BO->setOperand(1, ConstantInt::get(BO->getType(), NewShAmt)); in GetShiftedValue() 228 BO->setHasNoUnsignedWrap(false); in GetShiftedValue() 229 BO->setHasNoSignedWrap(false); in GetShiftedValue() 237 V = IC.Builder->CreateAnd(BO->getOperand(0), in GetShiftedValue() 238 ConstantInt::get(BO->getContext(), Mask)); in GetShiftedValue() 240 VI->moveBefore(BO); in GetShiftedValue() 241 VI->takeName(BO); in GetShiftedValue() [all …]
|
D | InstCombineVectorOps.cpp | 48 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(I)) in CheapToScalarize() local 49 if (BO->hasOneUse() && in CheapToScalarize() 50 (CheapToScalarize(BO->getOperand(0), isConstant) || in CheapToScalarize() 51 CheapToScalarize(BO->getOperand(1), isConstant))) in CheapToScalarize() 236 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(I)) { in visitExtractElementInst() local 238 CheapToScalarize(BO, isa<ConstantInt>(EI.getOperand(1)))) { in visitExtractElementInst() 240 Builder->CreateExtractElement(BO->getOperand(0), EI.getOperand(1), in visitExtractElementInst() 243 Builder->CreateExtractElement(BO->getOperand(1), EI.getOperand(1), in visitExtractElementInst() 245 return BinaryOperator::Create(BO->getOpcode(), newEI0, newEI1); in visitExtractElementInst() 690 BinaryOperator *BO = cast<BinaryOperator>(I); in BuildNew() local [all …]
|
D | InstCombineSelect.cpp | 211 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(TI)) { in FoldSelectOpOp() local 213 return BinaryOperator::Create(BO->getOpcode(), MatchOp, NewSI); in FoldSelectOpOp() 215 return BinaryOperator::Create(BO->getOpcode(), NewSI, MatchOp); in FoldSelectOpOp() 259 BinaryOperator *BO = BinaryOperator::Create(TVI_BO->getOpcode(), in FoldSelectIntoOp() local 261 if (isa<PossiblyExactOperator>(BO)) in FoldSelectIntoOp() 262 BO->setIsExact(TVI_BO->isExact()); in FoldSelectIntoOp() 263 if (isa<OverflowingBinaryOperator>(BO)) { in FoldSelectIntoOp() 264 BO->setHasNoUnsignedWrap(TVI_BO->hasNoUnsignedWrap()); in FoldSelectIntoOp() 265 BO->setHasNoSignedWrap(TVI_BO->hasNoSignedWrap()); in FoldSelectIntoOp() 267 return BO; in FoldSelectIntoOp() [all …]
|
D | InstCombineCompares.cpp | 1524 BinaryOperator *BO = cast<BinaryOperator>(LHSI); in visitICmpInstWithInstAndIntCst() local 1526 if (Instruction *Res = FoldICmpShrCst(ICI, BO, ShAmt)) in visitICmpInstWithInstAndIntCst() 1531 if (ICI.isEquality() && BO->isExact() && BO->hasOneUse()) { in visitICmpInstWithInstAndIntCst() 1533 return new ICmpInst(ICI.getPredicate(), BO->getOperand(0), RHS); in visitICmpInstWithInstAndIntCst() 1631 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(LHSI)) { in visitICmpInstWithInstAndIntCst() local 1632 switch (BO->getOpcode()) { in visitICmpInstWithInstAndIntCst() 1635 if (RHSV == 0 && isa<ConstantInt>(BO->getOperand(1)) &&BO->hasOneUse()){ in visitICmpInstWithInstAndIntCst() 1636 const APInt &V = cast<ConstantInt>(BO->getOperand(1))->getValue(); in visitICmpInstWithInstAndIntCst() 1639 Builder->CreateURem(BO->getOperand(0), BO->getOperand(1), in visitICmpInstWithInstAndIntCst() 1640 BO->getName()); in visitICmpInstWithInstAndIntCst() [all …]
|
D | InstCombineMulDivRem.cpp | 223 BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0); in visitMul() local 224 if (!BO || in visitMul() 225 (BO->getOpcode() != Instruction::UDiv && in visitMul() 226 BO->getOpcode() != Instruction::SDiv)) { in visitMul() 228 BO = dyn_cast<BinaryOperator>(Op1); in visitMul() 231 if (BO && BO->hasOneUse() && in visitMul() 232 (BO->getOperand(1) == Op1C || BO->getOperand(1) == Neg) && in visitMul() 233 (BO->getOpcode() == Instruction::UDiv || in visitMul() 234 BO->getOpcode() == Instruction::SDiv)) { in visitMul() 235 Value *Op0BO = BO->getOperand(0), *Op1BO = BO->getOperand(1); in visitMul() [all …]
|
D | InstructionCombining.cpp | 500 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(SimplifiedInst)) { in tryFactorization() local 513 BO->setHasNoSignedWrap(HasNSW); in tryFactorization() 666 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(&I)) { in FoldOperationIntoSelectOperand() local 667 Value *RI = IC->Builder->CreateBinOp(BO->getOpcode(), Op0, Op1, in FoldOperationIntoSelectOperand() 671 FPInst->copyFastMathFlags(BO); in FoldOperationIntoSelectOperand() 1003 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op)) { in Descale() local 1005 if (BO->getOpcode() == Instruction::Mul) { in Descale() 1007 NoSignedWrap = BO->hasNoSignedWrap(); in Descale() 1014 Value *LHS = BO->getOperand(0); in Descale() 1015 Value *RHS = BO->getOperand(1); in Descale() [all …]
|
/external/llvm/lib/Analysis/ |
D | ScalarEvolutionAliasAnalysis.cpp | 161 Value *BO = GetBaseValue(BS); in alias() local 162 if ((AO && AO != LocA.Ptr) || (BO && BO != LocB.Ptr)) in alias() 166 Location(BO ? BO : LocB.Ptr, in alias() 167 BO ? +UnknownSize : LocB.Size, in alias() 168 BO ? nullptr : LocB.TBAATag)) == NoAlias) in alias()
|
D | PHITransAddr.cpp | 299 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U)) in PHITranslateSubExpr() local 300 if (BO->getOpcode() == Instruction::Add && in PHITranslateSubExpr() 301 BO->getOperand(0) == LHS && BO->getOperand(1) == RHS && in PHITranslateSubExpr() 302 BO->getParent()->getParent() == CurBB->getParent() && in PHITranslateSubExpr() 303 (!DT || DT->dominates(BO->getParent(), PredBB))) in PHITranslateSubExpr() 304 return BO; in PHITranslateSubExpr()
|
/external/clang/lib/ARCMigrate/ |
D | TransZeroOutPropsInDealloc.cpp | 154 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) in isZeroingPropIvar() local 155 return isZeroingPropIvar(BO); in isZeroingPropIvar() 194 BinaryOperator *BO = dyn_cast<BinaryOperator>(PO->getSyntacticForm()); in isZeroingPropIvar() local 195 if (!BO) return false; in isZeroingPropIvar() 196 if (BO->getOpcode() != BO_Assign) return false; in isZeroingPropIvar() 199 dyn_cast<ObjCPropertyRefExpr>(BO->getLHS()->IgnoreParens()); in isZeroingPropIvar() 211 return isZero(cast<OpaqueValueExpr>(BO->getRHS())->getSourceExpr()); in isZeroingPropIvar()
|
/external/llvm/test/CodeGen/AArch64/ |
D | arm64-dagcombiner-dead-indexed-load.ll | 9 %"struct.SU" = type { i32, %"struct.SU"*, i32*, i32, i32, %"struct.BO", i32, [5 x i8] } 10 %"struct.BO" = type { %"struct.RE" } 25 %r2 = bitcast %"struct.BO"* %r1 to i48*
|
/external/clang/lib/StaticAnalyzer/Checkers/ |
D | DirectIvarAssignment.cpp | 78 void VisitBinaryOperator(const BinaryOperator *BO); 166 const BinaryOperator *BO) { in VisitBinaryOperator() argument 167 if (!BO->isAssignmentOp()) in VisitBinaryOperator() 171 dyn_cast<ObjCIvarRefExpr>(BO->getLHS()->IgnoreParenCasts()); in VisitBinaryOperator()
|
D | DeadStoresChecker.cpp | 105 const BinaryOperator *BO = in LookThroughTransitiveAssignmentsAndCommaOperators() local 107 if (!BO) in LookThroughTransitiveAssignmentsAndCommaOperators() 109 if (BO->getOpcode() == BO_Assign) { in LookThroughTransitiveAssignmentsAndCommaOperators() 110 Ex = BO->getRHS(); in LookThroughTransitiveAssignmentsAndCommaOperators() 113 if (BO->getOpcode() == BO_Comma) { in LookThroughTransitiveAssignmentsAndCommaOperators() 114 Ex = BO->getRHS(); in LookThroughTransitiveAssignmentsAndCommaOperators()
|
D | CheckObjCDealloc.cpp | 80 if (BinaryOperator* BO = dyn_cast<BinaryOperator>(S)) in scan_ivar_release() local 81 if (BO->isAssignmentOp()) in scan_ivar_release() 83 dyn_cast<ObjCPropertyRefExpr>(BO->getLHS()->IgnoreParenCasts())) in scan_ivar_release() 85 if (BO->getRHS()->isNullPointerConstant(Ctx, in scan_ivar_release()
|
D | IvarInvalidationChecker.cpp | 165 void VisitBinaryOperator(const BinaryOperator *BO); 672 const BinaryOperator *BO) { in VisitBinaryOperator() argument 673 VisitStmt(BO); in VisitBinaryOperator() 677 BinaryOperatorKind Opcode = BO->getOpcode(); in VisitBinaryOperator() 683 if (isZero(BO->getRHS())) { in VisitBinaryOperator() 684 check(BO->getLHS()); in VisitBinaryOperator() 688 if (Opcode != BO_Assign && isZero(BO->getLHS())) { in VisitBinaryOperator() 689 check(BO->getRHS()); in VisitBinaryOperator()
|
/external/llvm/lib/TableGen/ |
D | Record.cpp | 238 Init *StringRecTy::convertValue(UnOpInit *BO) { in convertValue() argument 239 if (BO->getOpcode() == UnOpInit::CAST) { in convertValue() 240 Init *L = BO->getOperand()->convertInitializerTo(this); in convertValue() 242 if (L != BO->getOperand()) in convertValue() 244 return BO; in convertValue() 247 return convertValue((TypedInit*)BO); in convertValue() 250 Init *StringRecTy::convertValue(BinOpInit *BO) { in convertValue() argument 251 if (BO->getOpcode() == BinOpInit::STRCONCAT) { in convertValue() 252 Init *L = BO->getLHS()->convertInitializerTo(this); in convertValue() 253 Init *R = BO->getRHS()->convertInitializerTo(this); in convertValue() [all …]
|
/external/llvm/lib/Transforms/Utils/ |
D | IntegerDivision.cpp | 402 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandRemainder() local 403 if (!BO || BO->getOpcode() != Instruction::URem) in expandRemainder() 406 Rem = BO; in expandRemainder() 460 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandDivision() local 461 if (!BO || BO->getOpcode() != Instruction::UDiv) in expandDivision() 464 Div = BO; in expandDivision()
|
/external/clang/lib/Sema/ |
D | SemaOpenMP.cpp | 1390 if (auto BO = dyn_cast<BinaryOperator>(S)) { in CheckInit() local 1391 if (BO->getOpcode() == BO_Assign) in CheckInit() 1392 if (auto DRE = dyn_cast<DeclRefExpr>(BO->getLHS()->IgnoreParens())) in CheckInit() 1393 return SetVarAndLB(dyn_cast<VarDecl>(DRE->getDecl()), BO->getLHS()); in CheckInit() 1447 if (auto BO = dyn_cast<BinaryOperator>(S)) { in CheckCond() local 1448 if (BO->isRelationalOp()) { in CheckCond() 1449 if (GetInitVarDecl(BO->getLHS()) == Var) in CheckCond() 1450 return SetUB(BO->getRHS(), in CheckCond() 1451 (BO->getOpcode() == BO_LT || BO->getOpcode() == BO_LE), in CheckCond() 1452 (BO->getOpcode() == BO_LT || BO->getOpcode() == BO_GT), in CheckCond() [all …]
|