Home
last modified time | relevance | path

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

1234567

/external/llvm/include/llvm/Support/
DNoFolder.h42 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/
DStmtVisitor.h43 if (PTR(BinaryOperator) BinOp = dyn_cast<BinaryOperator>(S)) { in Visit()
45 case BO_PtrMemD: DISPATCH(BinPtrMemD, BinaryOperator); in Visit()
46 case BO_PtrMemI: DISPATCH(BinPtrMemI, BinaryOperator); in Visit()
47 case BO_Mul: DISPATCH(BinMul, BinaryOperator); in Visit()
48 case BO_Div: DISPATCH(BinDiv, BinaryOperator); in Visit()
49 case BO_Rem: DISPATCH(BinRem, BinaryOperator); in Visit()
50 case BO_Add: DISPATCH(BinAdd, BinaryOperator); in Visit()
51 case BO_Sub: DISPATCH(BinSub, BinaryOperator); in Visit()
52 case BO_Shl: DISPATCH(BinShl, BinaryOperator); in Visit()
53 case BO_Shr: DISPATCH(BinShr, BinaryOperator); in Visit()
[all …]
/external/llvm/lib/Transforms/InstCombine/
DInstCombine.h43 if (BinaryOperator::isNeg(V) || in getComplexity()
44 BinaryOperator::isFNeg(V) || in getComplexity()
45 BinaryOperator::isNot(V)) in getComplexity()
109 Instruction *visitAdd(BinaryOperator &I);
110 Instruction *visitFAdd(BinaryOperator &I);
112 Instruction *visitSub(BinaryOperator &I);
113 Instruction *visitFSub(BinaryOperator &I);
114 Instruction *visitMul(BinaryOperator &I);
115 Instruction *visitFMul(BinaryOperator &I);
116 Instruction *visitURem(BinaryOperator &I);
[all …]
DInstCombineMulDivRem.cpp47 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 …]
DInstCombineAddSub.cpp86 Instruction *InstCombiner::visitAdd(BinaryOperator &I) { in visitAdd()
102 return BinaryOperator::CreateXor(LHS, RHS); in visitAdd()
137 return BinaryOperator::CreateAShr(NewShl, ShAmt); in visitAdd()
148 return BinaryOperator::CreateSub(ConstantExpr::getAdd(XorRHS, CI), in visitAdd()
159 return BinaryOperator::CreateXor(LHS, RHS); in visitAdd()
163 BinaryOperator *New = in visitAdd()
164 BinaryOperator::CreateShl(LHS, ConstantInt::get(I.getType(), 1)); in visitAdd()
175 return BinaryOperator::CreateNeg(NewAdd); in visitAdd()
178 return BinaryOperator::CreateSub(RHS, LHSV); in visitAdd()
184 return BinaryOperator::CreateSub(LHS, V); in visitAdd()
[all …]
DInstCombineShifts.cpp22 Instruction *InstCombiner::commonShiftTransforms(BinaryOperator &I) { in commonShiftTransforms()
212 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue()
254 BinaryOperator *BO = cast<BinaryOperator>(I); in GetShiftedValue()
313 BinaryOperator &I) { in FoldShiftByConstant()
345 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(Op0)) in FoldShiftByConstant()
348 return BinaryOperator::CreateMul(BO->getOperand(0), in FoldShiftByConstant()
404 if (BinaryOperator *Op0BO = dyn_cast<BinaryOperator>(Op0)) { in FoldShiftByConstant()
425 return BinaryOperator::CreateAnd(X, ConstantInt::get(I.getContext(), in FoldShiftByConstant()
435 cast<BinaryOperator>(Op0BOOp1)->getOperand(0)->hasOneUse()) { in FoldShiftByConstant()
442 return BinaryOperator::Create(Op0BO->getOpcode(), YS, XM); in FoldShiftByConstant()
[all …]
DInstCombineAndOrXor.cpp37 if (BinaryOperator::isNot(V)) in isFreeToInvert()
54 if (BinaryOperator::isNot(V)) { in dyn_castNotVal()
55 Value *Operand = BinaryOperator::getNotArgument(V); in dyn_castNotVal()
134 BinaryOperator &TheAnd) { in OptAndOp()
146 return BinaryOperator::CreateXor(And, Together); in OptAndOp()
155 return BinaryOperator::CreateAnd(Or, AndRHS); in OptAndOp()
166 return BinaryOperator::CreateOr(And, OpRHS); in OptAndOp()
198 return BinaryOperator::CreateXor(NewAnd, AndRHS); in OptAndOp()
261 return BinaryOperator::CreateAnd(ShVal, AndRHS, TheAnd.getName()); in OptAndOp()
1013 Instruction *InstCombiner::visitAnd(BinaryOperator &I) { in visitAnd()
[all …]
DInstCombineSelect.cpp144 if (!isa<BinaryOperator>(TI)) in FoldSelectOpOp()
180 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(TI)) { in FoldSelectOpOp()
182 return BinaryOperator::Create(BO->getOpcode(), MatchOp, NewSI); in FoldSelectOpOp()
184 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()
295 if (BinaryOperator *B = dyn_cast<BinaryOperator>(I)) { in SimplifyWithOpReplaced()
663 return BinaryOperator::CreateOr(CondVal, FalseVal); in visitSelectInst()
[all …]
/external/llvm/include/llvm/
DInstrTypes.h140 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 …]
DInstruction.def108 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/
DReassociate.cpp95 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/
DCloning.cpp56 BinaryOperator *Add = BinaryOperator::Create(Instruction::Add, V, V); in TEST_F()
57 BinaryOperator *Sub = BinaryOperator::Create(Instruction::Sub, V, V); in TEST_F()
58 BinaryOperator *Mul = BinaryOperator::Create(Instruction::Mul, V, V); in TEST_F()
60 BinaryOperator *AddClone = this->clone(Add); in TEST_F()
61 BinaryOperator *SubClone = this->clone(Sub); in TEST_F()
62 BinaryOperator *MulClone = this->clone(Mul); in TEST_F()
139 BinaryOperator *SDiv = BinaryOperator::Create(Instruction::SDiv, V, V); in TEST_F()
/external/clang/lib/StaticAnalyzer/Checkers/
DUndefResultChecker.cpp28 : public Checker< check::PostStmt<BinaryOperator> > {
33 void checkPostStmt(const BinaryOperator *B, CheckerContext &C) const;
37 void UndefResultChecker::checkPostStmt(const BinaryOperator *B, in checkPostStmt()
67 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt()
73 << BinaryOperator::getOpcodeStr(B->getOpcode()) in checkPostStmt()
DDivZeroChecker.cpp25 class DivZeroChecker : public Checker< check::PreStmt<BinaryOperator> > {
31 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const;
51 void DivZeroChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
53 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt()
DMallocOverflowSecurityChecker.cpp33 const BinaryOperator *mulop;
36 MallocOverflowCheck (const BinaryOperator *m, const Expr *v) in MallocOverflowCheck()
68 const BinaryOperator * mulop = NULL; in CheckMallocArgument()
72 if (isa<BinaryOperator>(e)) { in CheckMallocArgument()
73 const BinaryOperator * binop = dyn_cast<BinaryOperator>(e); in CheckMallocArgument()
159 void VisitBinaryOperator(BinaryOperator *E) { in VisitBinaryOperator()
DIdempotentOperationChecker.cpp69 : public Checker<check::PreStmt<BinaryOperator>,
70 check::PostStmt<BinaryOperator>,
73 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const;
74 void checkPostStmt(const BinaryOperator *B, CheckerContext &C) const;
106 typedef llvm::DenseMap<const BinaryOperator *, BinaryOperatorData>
112 void IdempotentOperationChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
155 BinaryOperator::Opcode Op = B->getOpcode(); in checkPreStmt()
328 void IdempotentOperationChecker::checkPostStmt(const BinaryOperator *B, in checkPostStmt()
337 if (!isa<BinaryOperator>(predStmt)) in checkPostStmt()
361 const BinaryOperator *B = i->first; in checkEndAnalysis()
[all …]
DFixedAddressChecker.cpp27 : public Checker< check::PreStmt<BinaryOperator> > {
31 void checkPreStmt(const BinaryOperator *B, CheckerContext &C) const;
35 void FixedAddressChecker::checkPreStmt(const BinaryOperator *B, in checkPreStmt()
/external/clang/lib/StaticAnalyzer/Core/
DSimpleSValBuilder.cpp35 virtual SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op,
37 virtual SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op,
39 virtual SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op,
46 SVal MakeSymIntVal(const SymExpr *LHS, BinaryOperator::Opcode op,
180 static BinaryOperator::Opcode NegateComparison(BinaryOperator::Opcode op) { in NegateComparison()
193 static BinaryOperator::Opcode ReverseComparison(BinaryOperator::Opcode op) { in ReverseComparison()
208 BinaryOperator::Opcode op, in MakeSymIntVal()
280 BinaryOperator::Opcode op, in evalBinOpNN()
345 if (BinaryOperator::isRelationalOp(op)) in evalBinOpNN()
415 BinaryOperator::Opcode opc = symIntExpr->getOpcode(); in evalBinOpNN()
[all …]
/external/clang/include/clang/Analysis/Visitors/
DCFGStmtVisitor.h88 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/
DLint.cpp82 void visitXor(BinaryOperator &I);
83 void visitSub(BinaryOperator &I);
84 void visitLShr(BinaryOperator &I);
85 void visitAShr(BinaryOperator &I);
86 void visitShl(BinaryOperator &I);
87 void visitSDiv(BinaryOperator &I);
88 void visitUDiv(BinaryOperator &I);
89 void visitSRem(BinaryOperator &I);
90 void visitURem(BinaryOperator &I);
440 void Lint::visitXor(BinaryOperator &I) { in visitXor()
[all …]
DPHITransAddr.cpp264 bool isNSW = cast<BinaryOperator>(Inst)->hasNoSignedWrap(); in PHITranslateSubExpr()
265 bool isNUW = cast<BinaryOperator>(Inst)->hasNoUnsignedWrap(); in PHITranslateSubExpr()
271 if (BinaryOperator *BOp = dyn_cast<BinaryOperator>(LHS)) in PHITranslateSubExpr()
300 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(*UI)) in PHITranslateSubExpr()
430 BinaryOperator *Res = BinaryOperator::CreateAdd(OpVal, Inst->getOperand(1), in InsertPHITranslatedSubExpr()
433 Res->setHasNoSignedWrap(cast<BinaryOperator>(Inst)->hasNoSignedWrap()); in InsertPHITranslatedSubExpr()
434 Res->setHasNoUnsignedWrap(cast<BinaryOperator>(Inst)->hasNoUnsignedWrap()); in InsertPHITranslatedSubExpr()
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
DSymbolManager.h348 BinaryOperator::Opcode Op;
353 SymIntExpr(const SymExpr *lhs, BinaryOperator::Opcode op, in SymIntExpr()
361 BinaryOperator::Opcode getOpcode() const { return Op; } in getOpcode()
369 BinaryOperator::Opcode op, const llvm::APSInt& rhs, in Profile()
391 BinaryOperator::Opcode Op;
396 IntSymExpr(const llvm::APSInt& lhs, BinaryOperator::Opcode op, in IntSymExpr()
402 BinaryOperator::Opcode getOpcode() const { return Op; } in getOpcode()
410 BinaryOperator::Opcode op, const SymExpr *rhs, in Profile()
432 BinaryOperator::Opcode Op;
437 SymSymExpr(const SymExpr *lhs, BinaryOperator::Opcode op, const SymExpr *rhs, in SymSymExpr()
[all …]
DSValBuilder.h92 virtual SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op,
97 virtual SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op,
103 virtual SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op,
114 SVal makeGenericVal(ProgramStateRef state, BinaryOperator::Opcode op,
117 SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op,
270 NonLoc makeNonLoc(const SymExpr *lhs, BinaryOperator::Opcode op,
273 NonLoc makeNonLoc(const llvm::APSInt& rhs, BinaryOperator::Opcode op,
276 NonLoc makeNonLoc(const SymExpr *lhs, BinaryOperator::Opcode op,
/external/llvm/lib/VMCore/
DInstructions.cpp387 AllocSize = BinaryOperator::CreateMul(ArraySize, AllocSize, in createMalloc()
390 AllocSize = BinaryOperator::CreateMul(ArraySize, AllocSize, in createMalloc()
1719 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2, in BinaryOperator() function in BinaryOperator
1723 OperandTraits<BinaryOperator>::op_begin(this), in BinaryOperator()
1724 OperandTraits<BinaryOperator>::operands(this), in BinaryOperator()
1732 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2, in BinaryOperator() function in BinaryOperator
1736 OperandTraits<BinaryOperator>::op_begin(this), in BinaryOperator()
1737 OperandTraits<BinaryOperator>::operands(this), in BinaryOperator()
1746 void BinaryOperator::init(BinaryOps iType) { in init()
1821 BinaryOperator *BinaryOperator::Create(BinaryOps Op, Value *S1, Value *S2, in Create()
[all …]
/external/clang/lib/ARCMigrate/
DTransZeroOutPropsInDealloc.cpp90 bool VisitBinaryOperator(BinaryOperator *BOE) { in VisitBinaryOperator()
155 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(E)) in isZeroingPropIvar()
162 bool isZeroingPropIvar(BinaryOperator *BOE) { in isZeroingPropIvar()
195 BinaryOperator *BO = dyn_cast<BinaryOperator>(PO->getSyntacticForm()); in isZeroingPropIvar()

1234567