/external/llvm/lib/Transforms/Scalar/ |
D | SeparateConstOffsetFromGEP.cpp | 227 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended, 281 bool CanTraceInto(bool SignExtended, bool ZeroExtended, BinaryOperator *BO, 387 BinaryOperator *BO, in CanTraceInto() argument 392 if (BO->getOpcode() != Instruction::Add && in CanTraceInto() 393 BO->getOpcode() != Instruction::Sub && in CanTraceInto() 394 BO->getOpcode() != Instruction::Or) { in CanTraceInto() 398 Value *LHS = BO->getOperand(0), *RHS = BO->getOperand(1); in CanTraceInto() 401 if (BO->getOpcode() == Instruction::Or && !NoCommonBits(LHS, RHS)) in CanTraceInto() 415 if (BO->getOpcode() == Instruction::Add && !ZeroExtended && NonNegative) { in CanTraceInto() 436 if (BO->getOpcode() == Instruction::Add || in CanTraceInto() [all …]
|
D | Reassociate.cpp | 623 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() local 626 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree() 662 if (BinaryOperator *BO = isReassociableOp(Op, Opcode)) { in LinearizeExprTree() 664 Worklist.push_back(std::make_pair(BO, It->second)); in LinearizeExprTree() 693 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op)) in LinearizeExprTree() local 694 if ((Opcode == Instruction::Mul && BinaryOperator::isNeg(BO)) || in LinearizeExprTree() 695 (Opcode == Instruction::FMul && BinaryOperator::isFNeg(BO))) { in LinearizeExprTree() 697 BO = LowerNegateToMultiply(BO); in LinearizeExprTree() 698 DEBUG(dbgs() << *BO << '\n'); in LinearizeExprTree() 699 Worklist.push_back(std::make_pair(BO, Weight)); in LinearizeExprTree() [all …]
|
D | JumpThreading.cpp | 136 bool ProcessBranchOnXOR(BinaryOperator *BO); 479 } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(I)) { in ComputeValueKnownInPredecessors() local 482 if (ConstantInt *CI = dyn_cast<ConstantInt>(BO->getOperand(1))) { in ComputeValueKnownInPredecessors() 484 ComputeValueKnownInPredecessors(BO->getOperand(0), BB, LHSVals, in ComputeValueKnownInPredecessors() 490 Constant *Folded = ConstantExpr::get(BO->getOpcode(), V, CI); in ComputeValueKnownInPredecessors() 1258 bool JumpThreading::ProcessBranchOnXOR(BinaryOperator *BO) { in ProcessBranchOnXOR() argument 1259 BasicBlock *BB = BO->getParent(); in ProcessBranchOnXOR() 1263 if (isa<ConstantInt>(BO->getOperand(0)) || in ProcessBranchOnXOR() 1264 isa<ConstantInt>(BO->getOperand(1))) in ProcessBranchOnXOR() 1292 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 | 192 BinaryOperator *BO = Create(Opc, V1, V2, Name); 193 BO->setHasNoSignedWrap(true); 194 return BO; 198 BinaryOperator *BO = Create(Opc, V1, V2, Name, BB); 199 BO->setHasNoSignedWrap(true); 200 return BO; 204 BinaryOperator *BO = Create(Opc, V1, V2, Name, I); 205 BO->setHasNoSignedWrap(true); 206 return BO; 211 BinaryOperator *BO = Create(Opc, V1, V2, Name); [all …]
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombineMulDivRem.cpp | 183 BinaryOperator *BO = BinaryOperator::CreateNeg(Op0, I.getName()); in visitMul() local 185 BO->setHasNoSignedWrap(); in visitMul() 186 return BO; in visitMul() 200 BinaryOperator *BO = BinaryOperator::CreateMul(NewOp, Shl); in visitMul() local 202 BO->setHasNoUnsignedWrap(); in visitMul() 205 BO->setHasNoSignedWrap(); in visitMul() 206 return BO; in visitMul() 284 BinaryOperator *BO = BinaryOperator::CreateMul(Op0v, Op1v); in visitMul() local 288 BO->setHasNoSignedWrap(); in visitMul() 289 return BO; in visitMul() [all …]
|
D | InstCombineShifts.cpp | 219 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue() local 220 unsigned TypeWidth = BO->getType()->getScalarSizeInBits(); in GetShiftedValue() 223 ConstantInt *CI = cast<ConstantInt>(BO->getOperand(1)); in GetShiftedValue() 232 BO->setOperand(1, ConstantInt::get(BO->getType(), NewShAmt)); in GetShiftedValue() 233 BO->setHasNoUnsignedWrap(false); in GetShiftedValue() 234 BO->setHasNoSignedWrap(false); in GetShiftedValue() 242 V = IC.Builder->CreateAnd(BO->getOperand(0), in GetShiftedValue() 243 ConstantInt::get(BO->getContext(), Mask)); in GetShiftedValue() 245 VI->moveBefore(BO); in GetShiftedValue() 246 VI->takeName(BO); in GetShiftedValue() [all …]
|
D | InstCombineVectorOps.cpp | 49 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(I)) in CheapToScalarize() local 50 if (BO->hasOneUse() && in CheapToScalarize() 51 (CheapToScalarize(BO->getOperand(0), isConstant) || in CheapToScalarize() 52 CheapToScalarize(BO->getOperand(1), isConstant))) in CheapToScalarize() 237 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(I)) { in visitExtractElementInst() local 239 CheapToScalarize(BO, isa<ConstantInt>(EI.getOperand(1)))) { in visitExtractElementInst() 241 Builder->CreateExtractElement(BO->getOperand(0), EI.getOperand(1), in visitExtractElementInst() 244 Builder->CreateExtractElement(BO->getOperand(1), EI.getOperand(1), in visitExtractElementInst() 246 return BinaryOperator::Create(BO->getOpcode(), newEI0, newEI1); in visitExtractElementInst() 691 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 | 1647 BinaryOperator *BO = cast<BinaryOperator>(LHSI); in visitICmpInstWithInstAndIntCst() local 1649 if (Instruction *Res = FoldICmpShrCst(ICI, BO, ShAmt)) in visitICmpInstWithInstAndIntCst() 1654 if (ICI.isEquality() && BO->isExact() && BO->hasOneUse()) { in visitICmpInstWithInstAndIntCst() 1656 return new ICmpInst(ICI.getPredicate(), BO->getOperand(0), RHS); in visitICmpInstWithInstAndIntCst() 1754 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(LHSI)) { in visitICmpInstWithInstAndIntCst() local 1755 switch (BO->getOpcode()) { in visitICmpInstWithInstAndIntCst() 1758 if (RHSV == 0 && isa<ConstantInt>(BO->getOperand(1)) &&BO->hasOneUse()){ in visitICmpInstWithInstAndIntCst() 1759 const APInt &V = cast<ConstantInt>(BO->getOperand(1))->getValue(); in visitICmpInstWithInstAndIntCst() 1762 Builder->CreateURem(BO->getOperand(0), BO->getOperand(1), in visitICmpInstWithInstAndIntCst() 1763 BO->getName()); in visitICmpInstWithInstAndIntCst() [all …]
|
/external/clang/lib/Analysis/ |
D | ThreadSafetyCommon.cpp | 466 const BinaryOperator *BO, in translateBinOp() argument 468 til::SExpr *E0 = translate(BO->getLHS(), Ctx); in translateBinOp() 469 til::SExpr *E1 = translate(BO->getRHS(), Ctx); in translateBinOp() 478 const BinaryOperator *BO, in translateBinAssign() argument 481 const Expr *LHS = BO->getLHS(); in translateBinAssign() 482 const Expr *RHS = BO->getRHS(); in translateBinAssign() 504 til::SExpr *SExprBuilder::translateBinaryOperator(const BinaryOperator *BO, in translateBinaryOperator() argument 506 switch (BO->getOpcode()) { in translateBinaryOperator() 509 return new (Arena) til::Undefined(BO); in translateBinaryOperator() 511 case BO_Mul: return translateBinOp(til::BOP_Mul, BO, Ctx); in translateBinaryOperator() [all …]
|
D | UninitializedValues.cpp | 329 void VisitBinaryOperator(BinaryOperator *BO); 389 if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) { in classify() local 390 switch (BO->getOpcode()) { in classify() 393 classify(BO->getLHS(), C); in classify() 396 classify(BO->getRHS(), C); in classify() 417 void ClassifyRefs::VisitBinaryOperator(BinaryOperator *BO) { in VisitBinaryOperator() argument 423 if (BO->isCompoundAssignmentOp()) in VisitBinaryOperator() 424 classify(BO->getLHS(), Use); in VisitBinaryOperator() 425 else if (BO->getOpcode() == BO_Assign || BO->getOpcode() == BO_Comma) in VisitBinaryOperator() 426 classify(BO->getLHS(), Ignore); in VisitBinaryOperator() [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()
|
/external/llvm/lib/Transforms/Utils/ |
D | SimplifyIndVar.cpp | 270 bool SimplifyIndvar::strengthenOverflowingOperation(BinaryOperator *BO, in strengthenOverflowingOperation() argument 274 if (BO->hasNoUnsignedWrap() && BO->hasNoSignedWrap()) in strengthenOverflowingOperation() 280 switch (BO->getOpcode()) { in strengthenOverflowingOperation() 297 unsigned BitWidth = cast<IntegerType>(BO->getType())->getBitWidth(); in strengthenOverflowingOperation() 298 Type *WideTy = IntegerType::get(BO->getContext(), BitWidth * 2); in strengthenOverflowingOperation() 299 const SCEV *LHS = SE->getSCEV(BO->getOperand(0)); in strengthenOverflowingOperation() 300 const SCEV *RHS = SE->getSCEV(BO->getOperand(1)); in strengthenOverflowingOperation() 304 if (!BO->hasNoUnsignedWrap()) { in strengthenOverflowingOperation() 305 const SCEV *ExtendAfterOp = SE->getZeroExtendExpr(SE->getSCEV(BO), WideTy); in strengthenOverflowingOperation() 310 BO->setHasNoUnsignedWrap(); in strengthenOverflowingOperation() [all …]
|
/external/llvm/lib/Analysis/ |
D | ScalarEvolutionAliasAnalysis.cpp | 162 Value *BO = GetBaseValue(BS); in alias() local 163 if ((AO && AO != LocA.Ptr) || (BO && BO != LocB.Ptr)) in alias() 167 Location(BO ? BO : LocB.Ptr, in alias() 168 BO ? +UnknownSize : LocB.Size, in alias() 169 BO ? AAMDNodes() : LocB.AATags)) == 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 | 5 %"struct.SU" = type { i32, %"struct.SU"*, i32*, i32, i32, %"struct.BO", i32, [5 x i8] } 6 %"struct.BO" = type { %"struct.RE" } 21 %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 | CheckObjCDealloc.cpp | 59 if (BinaryOperator* BO = dyn_cast<BinaryOperator>(S)) in scan_ivar_release() local 60 if (BO->isAssignmentOp()) in scan_ivar_release() 62 dyn_cast<ObjCPropertyRefExpr>(BO->getLHS()->IgnoreParenCasts())) in scan_ivar_release() 64 if (BO->getRHS()->isNullPointerConstant(Ctx, in scan_ivar_release()
|
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 | 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()
|
D | DereferenceChecker.cpp | 113 if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(S)) { in reportBug() local 114 if (BO->isAssignmentOp()) in reportBug() 115 S = BO->getRHS(); in reportBug()
|
/external/llvm/lib/TableGen/ |
D | Record.cpp | 251 Init *StringRecTy::convertValue(UnOpInit *BO) { in convertValue() argument 252 if (BO->getOpcode() == UnOpInit::CAST) { in convertValue() 253 Init *L = BO->getOperand()->convertInitializerTo(this); in convertValue() 255 if (L != BO->getOperand()) in convertValue() 257 return BO; in convertValue() 260 return convertValue((TypedInit*)BO); in convertValue() 263 Init *StringRecTy::convertValue(BinOpInit *BO) { in convertValue() argument 264 if (BO->getOpcode() == BinOpInit::STRCONCAT) { in convertValue() 265 Init *L = BO->getLHS()->convertInitializerTo(this); in convertValue() 266 Init *R = BO->getRHS()->convertInitializerTo(this); in convertValue() [all …]
|
/external/clang/lib/AST/ |
D | Expr.cpp | 87 } else if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) { in skipRValueSubobjectAdjustments() local 88 if (BO->isPtrMemOp()) { in skipRValueSubobjectAdjustments() 89 assert(BO->getRHS()->isRValue()); in skipRValueSubobjectAdjustments() 90 E = BO->getLHS(); in skipRValueSubobjectAdjustments() 92 BO->getRHS()->getType()->getAs<MemberPointerType>(); in skipRValueSubobjectAdjustments() 93 Adjustments.push_back(SubobjectAdjustment(MPT, BO->getRHS())); in skipRValueSubobjectAdjustments() 95 } else if (BO->getOpcode() == BO_Comma) { in skipRValueSubobjectAdjustments() 96 CommaLHSs.push_back(BO->getLHS()); in skipRValueSubobjectAdjustments() 97 E = BO->getRHS(); in skipRValueSubobjectAdjustments() 136 if (const BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) { in isKnownToHaveBooleanValue() local [all …]
|