/external/llvm/include/llvm/Support/ |
D | NoFolder.h | 42 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS); 48 return BinaryOperator::CreateNSWAdd(LHS, RHS); in CreateNSWAdd() 51 return BinaryOperator::CreateNUWAdd(LHS, RHS); in CreateNUWAdd() 54 return BinaryOperator::CreateFAdd(LHS, RHS); in CreateFAdd() 58 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS); 64 return BinaryOperator::CreateNSWSub(LHS, RHS); in CreateNSWSub() 67 return BinaryOperator::CreateNUWSub(LHS, RHS); in CreateNUWSub() 70 return BinaryOperator::CreateFSub(LHS, RHS); in CreateFSub() 74 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS); 80 return BinaryOperator::CreateNSWMul(LHS, RHS); in CreateNSWMul() [all …]
|
/external/clang/include/clang/AST/ |
D | StmtVisitor.h | 43 if (PTR(BinaryOperator) BinOp = dyn_cast<BinaryOperator>(S)) { in Visit() 46 case BO_PtrMemD: DISPATCH(BinPtrMemD, BinaryOperator); in Visit() 47 case BO_PtrMemI: DISPATCH(BinPtrMemI, BinaryOperator); in Visit() 48 case BO_Mul: DISPATCH(BinMul, BinaryOperator); in Visit() 49 case BO_Div: DISPATCH(BinDiv, BinaryOperator); in Visit() 50 case BO_Rem: DISPATCH(BinRem, BinaryOperator); in Visit() 51 case BO_Add: DISPATCH(BinAdd, BinaryOperator); in Visit() 52 case BO_Sub: DISPATCH(BinSub, BinaryOperator); in Visit() 53 case BO_Shl: DISPATCH(BinShl, BinaryOperator); in Visit() 54 case BO_Shr: DISPATCH(BinShr, BinaryOperator); in Visit() [all …]
|
/external/llvm/lib/Transforms/InstCombine/ |
D | InstCombine.h | 41 if (BinaryOperator::isNeg(V) || in getComplexity() 42 BinaryOperator::isFNeg(V) || in getComplexity() 43 BinaryOperator::isNot(V)) in getComplexity() 104 Instruction *visitAdd(BinaryOperator &I); 105 Instruction *visitFAdd(BinaryOperator &I); 107 Instruction *visitSub(BinaryOperator &I); 108 Instruction *visitFSub(BinaryOperator &I); 109 Instruction *visitMul(BinaryOperator &I); 110 Instruction *visitFMul(BinaryOperator &I); 111 Instruction *visitURem(BinaryOperator &I); [all …]
|
D | InstCombineMulDivRem.cpp | 47 if (BinaryOperator *I = dyn_cast<BinaryOperator>(V)) in simplifyValueKnownNonZero() 99 Instruction *InstCombiner::visitMul(BinaryOperator &I) { in visitMul() 110 return BinaryOperator::CreateNeg(Op0, I.getName()); in visitMul() 115 if (BinaryOperator *SI = dyn_cast<BinaryOperator>(Op0)) in visitMul() 118 return BinaryOperator::CreateMul(SI->getOperand(0), in visitMul() 124 BinaryOperator *Shl = BinaryOperator::CreateShl(Op0, NewCst); in visitMul() 135 return BinaryOperator::CreateAdd(Add, Builder->CreateMul(C1, CI)); in visitMul() 156 BinaryOperator::CreateMul(Sub, in visitMul() 177 return BinaryOperator::CreateMul(Op0v, Op1v); in visitMul() 183 BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0); in visitMul() [all …]
|
D | InstCombineAddSub.cpp | 86 Instruction *InstCombiner::visitAdd(BinaryOperator &I) { in visitAdd() 102 return BinaryOperator::CreateXor(LHS, RHS); in visitAdd() 137 return BinaryOperator::CreateAShr(NewShl, ShAmt); in visitAdd() 147 return BinaryOperator::CreateXor(LHS, RHS); in visitAdd() 151 BinaryOperator *New = in visitAdd() 152 BinaryOperator::CreateShl(LHS, ConstantInt::get(I.getType(), 1)); in visitAdd() 163 return BinaryOperator::CreateNeg(NewAdd); in visitAdd() 166 return BinaryOperator::CreateSub(RHS, LHSV); in visitAdd() 172 return BinaryOperator::CreateSub(LHS, V); in visitAdd() 178 return BinaryOperator::CreateMul(RHS, AddOne(C2)); in visitAdd() [all …]
|
D | InstCombineAndOrXor.cpp | 36 if (BinaryOperator::isNot(V)) in isFreeToInvert() 53 if (BinaryOperator::isNot(V)) { in dyn_castNotVal() 54 Value *Operand = BinaryOperator::getNotArgument(V); in dyn_castNotVal() 197 BinaryOperator &TheAnd) { in OptAndOp() 209 return BinaryOperator::CreateXor(And, Together); in OptAndOp() 218 return BinaryOperator::CreateAnd(Or, AndRHS); in OptAndOp() 229 return BinaryOperator::CreateOr(And, OpRHS); in OptAndOp() 261 return BinaryOperator::CreateXor(NewAnd, AndRHS); in OptAndOp() 324 return BinaryOperator::CreateAnd(ShVal, AndRHS, TheAnd.getName()); in OptAndOp() 1033 Instruction *InstCombiner::visitAnd(BinaryOperator &I) { in visitAnd() [all …]
|
D | InstCombineShifts.cpp | 21 Instruction *InstCombiner::commonShiftTransforms(BinaryOperator &I) { in commonShiftTransforms() 303 BinaryOperator &I) { in FoldShiftByConstant() 335 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0)) in FoldShiftByConstant() 338 return BinaryOperator::CreateMul(BO->getOperand(0), in FoldShiftByConstant() 394 if (BinaryOperator *Op0BO = dyn_cast<BinaryOperator>(Op0)) { in FoldShiftByConstant() 415 return BinaryOperator::CreateAnd(X, ConstantInt::get(I.getContext(), in FoldShiftByConstant() 425 cast<BinaryOperator>(Op0BOOp1)->getOperand(0)->hasOneUse()) { in FoldShiftByConstant() 432 return BinaryOperator::Create(Op0BO->getOpcode(), YS, XM); in FoldShiftByConstant() 448 return BinaryOperator::CreateAnd(X, ConstantInt::get(I.getContext(), in FoldShiftByConstant() 457 cast<BinaryOperator>(Op0BO->getOperand(0)) in FoldShiftByConstant() [all …]
|
D | InstCombineSelect.cpp | 143 if (!isa<BinaryOperator>(TI)) in FoldSelectOpOp() 179 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(TI)) { in FoldSelectOpOp() 181 return BinaryOperator::Create(BO->getOpcode(), MatchOp, NewSI); in FoldSelectOpOp() 183 return BinaryOperator::Create(BO->getOpcode(), NewSI, MatchOp); in FoldSelectOpOp() 227 BinaryOperator *TVI_BO = cast<BinaryOperator>(TVI); in FoldSelectIntoOp() 228 BinaryOperator *BO = BinaryOperator::Create(TVI_BO->getOpcode(), in FoldSelectIntoOp() 262 BinaryOperator *FVI_BO = cast<BinaryOperator>(FVI); in FoldSelectIntoOp() 263 BinaryOperator *BO = BinaryOperator::Create(FVI_BO->getOpcode(), in FoldSelectIntoOp() 294 if (BinaryOperator *B = dyn_cast<BinaryOperator>(I)) { in SimplifyWithOpReplaced() 649 return BinaryOperator::CreateOr(CondVal, FalseVal); in visitSelectInst() [all …]
|
/external/llvm/include/llvm/ |
D | InstrTypes.h | 140 class BinaryOperator : public Instruction { 144 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, 146 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, 148 virtual BinaryOperator *clone_impl() const; 163 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, 171 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, 178 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ 184 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ 190 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ 196 static BinaryOperator *CreateNSW(BinaryOps Opc, Value *V1, Value *V2, [all …]
|
D | Instruction.def | 108 HANDLE_BINARY_INST( 8, Add , BinaryOperator) 109 HANDLE_BINARY_INST( 9, FAdd , BinaryOperator) 110 HANDLE_BINARY_INST(10, Sub , BinaryOperator) 111 HANDLE_BINARY_INST(11, FSub , BinaryOperator) 112 HANDLE_BINARY_INST(12, Mul , BinaryOperator) 113 HANDLE_BINARY_INST(13, FMul , BinaryOperator) 114 HANDLE_BINARY_INST(14, UDiv , BinaryOperator) 115 HANDLE_BINARY_INST(15, SDiv , BinaryOperator) 116 HANDLE_BINARY_INST(16, FDiv , BinaryOperator) 117 HANDLE_BINARY_INST(17, URem , BinaryOperator) [all …]
|
/external/llvm/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 95 Value *ReassociateExpression(BinaryOperator *I); 96 void RewriteExprTree(BinaryOperator *I, SmallVectorImpl<ValueEntry> &Ops, 98 Value *OptimizeExpression(BinaryOperator *I, 101 void LinearizeExprTree(BinaryOperator *I, SmallVectorImpl<ValueEntry> &Ops); 102 void LinearizeExpr(BinaryOperator *I); 119 if (!Op || !isa<BinaryOperator>(Op)) in RemoveDeadBinaryOp() 192 (!BinaryOperator::isNot(I) && !BinaryOperator::isNeg(I))) in getRank() 203 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode) { in isReassociableOp() 206 return cast<BinaryOperator>(V); in isReassociableOp() 216 Instruction *Res = BinaryOperator::CreateMul(Neg->getOperand(1), Cst, "",Neg); in LowerNegateToMultiply() [all …]
|
/external/llvm/unittests/Transforms/Utils/ |
D | Cloning.cpp | 54 BinaryOperator *Add = BinaryOperator::Create(Instruction::Add, V, V); in TEST_F() 55 BinaryOperator *Sub = BinaryOperator::Create(Instruction::Sub, V, V); in TEST_F() 56 BinaryOperator *Mul = BinaryOperator::Create(Instruction::Mul, V, V); in TEST_F() 58 BinaryOperator *AddClone = this->clone(Add); in TEST_F() 59 BinaryOperator *SubClone = this->clone(Sub); in TEST_F() 60 BinaryOperator *MulClone = this->clone(Mul); in TEST_F() 137 BinaryOperator *SDiv = BinaryOperator::Create(Instruction::SDiv, V, V); in TEST_F()
|
/external/clang/lib/StaticAnalyzer/Checkers/ |
D | UndefResultChecker.cpp | 27 : public Checker< check::PostStmt<BinaryOperator> > { 32 void checkPostStmt(const BinaryOperator *B, CheckerContext &C) const; 36 void UndefResultChecker::checkPostStmt(const BinaryOperator *B, in checkPostStmt() 65 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt() 71 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt()
|
D | DivZeroChecker.cpp | 25 class DivZeroChecker : public Checker< check::PreStmt<BinaryOperator> > { 28 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; 32 void DivZeroChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt() 34 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt()
|
D | IdempotentOperationChecker.cpp | 68 : public Checker<check::PreStmt<BinaryOperator>, 69 check::PostStmt<BinaryOperator>, 72 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; 73 void checkPostStmt(const BinaryOperator *B, CheckerContext &C) const; 106 typedef llvm::DenseMap<const BinaryOperator *, BinaryOperatorData> 112 void IdempotentOperationChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt() 156 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt() 329 void IdempotentOperationChecker::checkPostStmt(const BinaryOperator *B, in checkPostStmt() 338 if (!isa<BinaryOperator>(predStmt)) in checkPostStmt() 357 const BinaryOperator *B = i->first; in checkEndAnalysis() [all …]
|
D | FixedAddressChecker.cpp | 27 : public Checker< check::PreStmt<BinaryOperator> > { 31 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; 35 void FixedAddressChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
|
D | PointerArithChecker.cpp | 26 : public Checker< check::PreStmt<BinaryOperator> > { 30 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; 34 void PointerArithChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
|
D | PointerSubChecker.cpp | 27 : public Checker< check::PreStmt<BinaryOperator> > { 31 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const; 35 void PointerSubChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | SimpleSValBuilder.cpp | 34 virtual SVal evalBinOpNN(const GRState *state, BinaryOperator::Opcode op, 36 virtual SVal evalBinOpLL(const GRState *state, BinaryOperator::Opcode op, 38 virtual SVal evalBinOpLN(const GRState *state, BinaryOperator::Opcode op, 45 SVal MakeSymIntVal(const SymExpr *LHS, BinaryOperator::Opcode op, 171 static BinaryOperator::Opcode NegateComparison(BinaryOperator::Opcode op) { in NegateComparison() 184 static BinaryOperator::Opcode ReverseComparison(BinaryOperator::Opcode op) { in ReverseComparison() 199 BinaryOperator::Opcode op, in MakeSymIntVal() 274 BinaryOperator::Opcode op, in evalBinOpNN() 342 BinaryOperator::Opcode opc = symIntExpr->getOpcode(); in evalBinOpNN() 391 if (BinaryOperator::isAdditiveOp(op)) { in evalBinOpNN() [all …]
|
D | SimpleConstraintManager.cpp | 123 static BinaryOperator::Opcode NegateComparison(BinaryOperator::Opcode op) { in NegateComparison() 177 BinaryOperator::Opcode op = SE->getOpcode(); in assumeAux() 179 if (!BinaryOperator::isComparisonOp(op)) { in assumeAux() 207 BinaryOperator::Opcode op, in assumeSymRel() 209 assert(BinaryOperator::isComparisonOp(op) && in assumeSymRel()
|
/external/clang/include/clang/Analysis/Visitors/ |
D | CFGStmtVisitor.h | 88 BinaryOperator* B = cast<BinaryOperator>(S); in BlockStmt_Visit() 129 RetTy BlockStmt_VisitLogicalOp(BinaryOperator* B) { in BlockStmt_VisitLogicalOp() 134 RetTy BlockStmt_VisitComma(BinaryOperator* B) { in BlockStmt_VisitComma() 158 BinaryOperator* B = cast<BinaryOperator>(S); in VisitChildren()
|
/external/llvm/lib/Analysis/ |
D | Lint.cpp | 81 void visitXor(BinaryOperator &I); 82 void visitSub(BinaryOperator &I); 83 void visitLShr(BinaryOperator &I); 84 void visitAShr(BinaryOperator &I); 85 void visitShl(BinaryOperator &I); 86 void visitSDiv(BinaryOperator &I); 87 void visitUDiv(BinaryOperator &I); 88 void visitSRem(BinaryOperator &I); 89 void visitURem(BinaryOperator &I); 436 void Lint::visitXor(BinaryOperator &I) { in visitXor() [all …]
|
D | PHITransAddr.cpp | 265 bool isNSW = cast<BinaryOperator>(Inst)->hasNoSignedWrap(); in PHITranslateSubExpr() 266 bool isNUW = cast<BinaryOperator>(Inst)->hasNoUnsignedWrap(); in PHITranslateSubExpr() 272 if (BinaryOperator *BOp = dyn_cast<BinaryOperator>(LHS)) in PHITranslateSubExpr() 301 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(*UI)) in PHITranslateSubExpr() 431 BinaryOperator *Res = BinaryOperator::CreateAdd(OpVal, Inst->getOperand(1), in InsertPHITranslatedSubExpr() 434 Res->setHasNoSignedWrap(cast<BinaryOperator>(Inst)->hasNoSignedWrap()); in InsertPHITranslatedSubExpr() 435 Res->setHasNoUnsignedWrap(cast<BinaryOperator>(Inst)->hasNoUnsignedWrap()); in InsertPHITranslatedSubExpr()
|
/external/llvm/lib/VMCore/ |
D | Instructions.cpp | 305 AllocSize = BinaryOperator::CreateMul(ArraySize, AllocSize, in createMalloc() 308 AllocSize = BinaryOperator::CreateMul(ArraySize, AllocSize, in createMalloc() 1415 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2, in BinaryOperator() function in BinaryOperator 1419 OperandTraits<BinaryOperator>::op_begin(this), in BinaryOperator() 1420 OperandTraits<BinaryOperator>::operands(this), in BinaryOperator() 1428 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2, in BinaryOperator() function in BinaryOperator 1432 OperandTraits<BinaryOperator>::op_begin(this), in BinaryOperator() 1433 OperandTraits<BinaryOperator>::operands(this), in BinaryOperator() 1442 void BinaryOperator::init(BinaryOps iType) { in init() 1517 BinaryOperator *BinaryOperator::Create(BinaryOps Op, Value *S1, Value *S2, in Create() [all …]
|
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
D | SymbolManager.h | 275 BinaryOperator::Opcode Op; 280 SymIntExpr(const SymExpr *lhs, BinaryOperator::Opcode op, in SymIntExpr() 288 BinaryOperator::Opcode getOpcode() const { return Op; } in getOpcode() 296 BinaryOperator::Opcode op, const llvm::APSInt& rhs, in Profile() 318 BinaryOperator::Opcode Op; 323 SymSymExpr(const SymExpr *lhs, BinaryOperator::Opcode op, const SymExpr *rhs, in SymSymExpr() 327 BinaryOperator::Opcode getOpcode() const { return Op; } in getOpcode() 338 BinaryOperator::Opcode op, const SymExpr *rhs, QualType t) { in Profile() 394 const SymIntExpr *getSymIntExpr(const SymExpr *lhs, BinaryOperator::Opcode op, 397 const SymIntExpr *getSymIntExpr(const SymExpr &lhs, BinaryOperator::Opcode op, in getSymIntExpr() [all …]
|