/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/IR/ |
D | NoFolder.h | 43 BinaryOperator *BO = BinaryOperator::CreateAdd(LHS, RHS); 50 return BinaryOperator::CreateNSWAdd(LHS, RHS); in CreateNSWAdd() 54 return BinaryOperator::CreateNUWAdd(LHS, RHS); in CreateNUWAdd() 58 return BinaryOperator::CreateFAdd(LHS, RHS); in CreateFAdd() 63 BinaryOperator *BO = BinaryOperator::CreateSub(LHS, RHS); 70 return BinaryOperator::CreateNSWSub(LHS, RHS); in CreateNSWSub() 74 return BinaryOperator::CreateNUWSub(LHS, RHS); in CreateNUWSub() 78 return BinaryOperator::CreateFSub(LHS, RHS); in CreateFSub() 83 BinaryOperator *BO = BinaryOperator::CreateMul(LHS, RHS); 90 return BinaryOperator::CreateNSWMul(LHS, RHS); in CreateNSWMul() [all …]
|
D | Instruction.def | 147 HANDLE_BINARY_INST(13, Add , BinaryOperator) 148 HANDLE_BINARY_INST(14, FAdd , BinaryOperator) 149 HANDLE_BINARY_INST(15, Sub , BinaryOperator) 150 HANDLE_BINARY_INST(16, FSub , BinaryOperator) 151 HANDLE_BINARY_INST(17, Mul , BinaryOperator) 152 HANDLE_BINARY_INST(18, FMul , BinaryOperator) 153 HANDLE_BINARY_INST(19, UDiv , BinaryOperator) 154 HANDLE_BINARY_INST(20, SDiv , BinaryOperator) 155 HANDLE_BINARY_INST(21, FDiv , BinaryOperator) 156 HANDLE_BINARY_INST(22, URem , BinaryOperator) [all …]
|
D | InstrTypes.h | 188 class BinaryOperator : public Instruction { 192 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, 194 BinaryOperator(BinaryOps iType, Value *S1, Value *S2, Type *Ty, 200 BinaryOperator *cloneImpl() const; 216 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, 224 static BinaryOperator *Create(BinaryOps Op, Value *S1, Value *S2, 231 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ 237 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ 243 static BinaryOperator *Create##OPC(Value *V1, Value *V2, \ 249 static BinaryOperator *CreateWithCopiedFlags(BinaryOps Opc, [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/InstCombine/ |
D | InstCombineInternal.h | 202 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(V)) in isFreeToInvert() 246 BinaryOperator::BinaryOps Opcode, Constant *In, bool IsRHSConstant) { in getSafeVectorConstantForBinop() 370 Instruction *visitAdd(BinaryOperator &I); 371 Instruction *visitFAdd(BinaryOperator &I); 374 Instruction *visitSub(BinaryOperator &I); 375 Instruction *visitFSub(BinaryOperator &I); 376 Instruction *visitMul(BinaryOperator &I); 377 Instruction *visitFMul(BinaryOperator &I); 378 Instruction *visitURem(BinaryOperator &I); 379 Instruction *visitSRem(BinaryOperator &I); [all …]
|
D | InstCombineMulDivRem.cpp | 69 BinaryOperator *I = dyn_cast<BinaryOperator>(V); in simplifyValueKnownNonZero() 132 static Value *foldMulSelectToNegate(BinaryOperator &I, in foldMulSelectToNegate() 171 Instruction *InstCombiner::visitMul(BinaryOperator &I) { in visitMul() 188 BinaryOperator *BO = BinaryOperator::CreateNeg(Op0, I.getName()); in visitMul() 204 BinaryOperator *Mul = cast<BinaryOperator>(I.getOperand(0)); in visitMul() 205 BinaryOperator *BO = BinaryOperator::CreateMul(NewOp, Shl); in visitMul() 217 BinaryOperator *Shl = BinaryOperator::CreateShl(NewOp, NewCst); in visitMul() 250 BinaryOperator::CreateMul(Sub, in visitMul() 273 return BinaryOperator::CreateAdd(Builder.CreateMul(X, Op1), Mul); in visitMul() 281 return BinaryOperator::CreateMul(X, ConstantExpr::getNeg(Op1C)); in visitMul() [all …]
|
D | InstCombineAddSub.cpp | 769 static Value *checkForNegativeOperand(BinaryOperator &I, in checkForNegativeOperand() 826 static Instruction *foldNoWrapAdd(BinaryOperator &Add, in foldNoWrapAdd() 853 return BinaryOperator::CreateAdd(WideX, NewC); in foldNoWrapAdd() 860 return BinaryOperator::CreateAdd(WideX, NewC); in foldNoWrapAdd() 866 Instruction *InstCombiner::foldAddWithConstant(BinaryOperator &Add) { in foldAddWithConstant() 880 return BinaryOperator::CreateSub(ConstantExpr::getAdd(Op00C, Op1C), X); in foldAddWithConstant() 887 return BinaryOperator::CreateAdd(Builder.CreateNot(Y), X); in foldAddWithConstant() 900 return BinaryOperator::CreateSub(SubOne(Op1C), X); in foldAddWithConstant() 909 return BinaryOperator::CreateXor(Op0, ConstantInt::get(Add.getType(), *C2)); in foldAddWithConstant() 915 return BinaryOperator::CreateOr(Op0, Op1); in foldAddWithConstant() [all …]
|
D | InstCombineShifts.cpp | 35 BinaryOperator *Sh0, const SimplifyQuery &SQ, in reassociateShiftAmtsOfTwoSameDirectionShifts() 136 BinaryOperator *NewShift = BinaryOperator::Create(ShiftOpcode, X, NewShAmt); in reassociateShiftAmtsOfTwoSameDirectionShifts() 178 dropRedundantMaskingOfLeftShiftInput(BinaryOperator *OuterShift, in dropRedundantMaskingOfLeftShiftInput() 310 auto *NewShift = BinaryOperator::Create(OuterShift->getOpcode(), X, in dropRedundantMaskingOfLeftShiftInput() 316 return BinaryOperator::Create(Instruction::And, NewShift, NewMask); in dropRedundantMaskingOfLeftShiftInput() 323 static Instruction *foldShiftOfShiftedLogic(BinaryOperator &I, in foldShiftOfShiftedLogic() 326 auto *LogicInst = dyn_cast<BinaryOperator>(I.getOperand(0)); in foldShiftOfShiftedLogic() 344 cast<BinaryOperator>(V)->getOpcode() == ShiftOpcode && in foldShiftOfShiftedLogic() 360 return BinaryOperator::Create(LogicInst->getOpcode(), NewShift1, NewShift2); in foldShiftOfShiftedLogic() 363 Instruction *InstCombiner::commonShiftTransforms(BinaryOperator &I) { in commonShiftTransforms() [all …]
|
D | InstCombineAndOrXor.cpp | 82 static Value *SimplifyBSwap(BinaryOperator &I, in SimplifyBSwap() 117 Instruction *InstCombiner::OptAndOp(BinaryOperator *Op, in OptAndOp() 120 BinaryOperator &TheAnd) { in OptAndOp() 152 return BinaryOperator::CreateXor(NewAnd, AndRHS); in OptAndOp() 1413 static Instruction *reassociateFCmps(BinaryOperator &BO, in reassociateFCmps() 1427 BinaryOperator *BO1; in reassociateFCmps() 1452 return BinaryOperator::Create(Opcode, NewFCmp, BO11); in reassociateFCmps() 1458 static Instruction *matchDeMorgansLaws(BinaryOperator &I, in matchDeMorgansLaws() 1473 return BinaryOperator::CreateNot(AndOr); in matchDeMorgansLaws() 1496 static Instruction *foldLogicCastConstant(BinaryOperator &Logic, CastInst *Cast, in foldLogicCastConstant() [all …]
|
D | InstCombineSelect.cpp | 78 BinaryOperator *BO; in foldSelectBinOpIdentity() 243 static unsigned getSelectFoldableOperands(BinaryOperator *I) { in getSelectFoldableOperands() 263 static APInt getSelectFoldableConstant(BinaryOperator *I) { in getSelectFoldableConstant() 344 return BinaryOperator::CreateFNegFMF(NewSel, cast<BinaryOperator>(TI)); in foldSelectOpOp() 353 (!isa<BinaryOperator>(TI) && !isa<GetElementPtrInst>(TI)) || in foldSelectOpOp() 398 if (auto *BO = dyn_cast<BinaryOperator>(TI)) { in foldSelectOpOp() 399 BinaryOperator *NewBO = BinaryOperator::Create(BO->getOpcode(), Op0, Op1); in foldSelectOpOp() 428 if (auto *TVI = dyn_cast<BinaryOperator>(TrueVal)) { in foldSelectIntoOp() 449 BinaryOperator *BO = BinaryOperator::Create(TVI->getOpcode(), in foldSelectIntoOp() 459 if (auto *FVI = dyn_cast<BinaryOperator>(FalseVal)) { in foldSelectIntoOp() [all …]
|
D | InstructionCombining.cpp | 218 static bool maintainNoSignedWrap(BinaryOperator &I, Value *B, Value *C) { in maintainNoSignedWrap() 241 static bool hasNoUnsignedWrap(BinaryOperator &I) { in hasNoUnsignedWrap() 246 static bool hasNoSignedWrap(BinaryOperator &I) { in hasNoSignedWrap() 254 static void ClearSubclassDataAfterReassociation(BinaryOperator &I) { in ClearSubclassDataAfterReassociation() 270 static bool simplifyAssocCastAssoc(BinaryOperator *BinOp1) { in simplifyAssocCastAssoc() 285 auto *BinOp2 = dyn_cast<BinaryOperator>(Cast->getOperand(0)); in simplifyAssocCastAssoc() 328 bool InstCombiner::SimplifyAssociativeOrCommutative(BinaryOperator &I) { in SimplifyAssociativeOrCommutative() 340 BinaryOperator *Op0 = dyn_cast<BinaryOperator>(I.getOperand(0)); in SimplifyAssociativeOrCommutative() 341 BinaryOperator *Op1 = dyn_cast<BinaryOperator>(I.getOperand(1)); in SimplifyAssociativeOrCommutative() 456 BinaryOperator *NewBO = (IsNUW && Opcode == Instruction::Add) ? in SimplifyAssociativeOrCommutative() [all …]
|
D | InstCombineCasts.cpp | 39 if (BinaryOperator *I = dyn_cast<BinaryOperator>(Val)) { in decomposeSimpleLinearExpr() 190 Res = BinaryOperator::Create((Instruction::BinaryOps)Opc, LHS, RHS); in EvaluateInDifferentType() 519 auto ShiftOpcode0 = cast<BinaryOperator>(Or0)->getOpcode(); in narrowRotate() 520 auto ShiftOpcode1 = cast<BinaryOperator>(Or1)->getOpcode(); in narrowRotate() 570 bool IsFshl = (!SubIsOnLHS && ShiftOpcode0 == BinaryOperator::Shl) || in narrowRotate() 571 (SubIsOnLHS && ShiftOpcode1 == BinaryOperator::Shl); in narrowRotate() 586 BinaryOperator *BinOp; in narrowBinOp() 604 return BinaryOperator::Create(BinOp->getOpcode(), NarrowC, TruncX); in narrowBinOp() 610 return BinaryOperator::Create(BinOp->getOpcode(), TruncX, NarrowC); in narrowBinOp() 616 return BinaryOperator::Create(BinOp->getOpcode(), X, NarrowOp1); in narrowBinOp() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Transforms/Utils/ |
D | IntegerDivision.h | 20 class BinaryOperator; variable 32 bool expandRemainder(BinaryOperator *Rem); 41 bool expandDivision(BinaryOperator* Div); 49 bool expandRemainderUpTo32Bits(BinaryOperator *Rem); 55 bool expandRemainderUpTo64Bits(BinaryOperator *Rem); 62 bool expandDivisionUpTo32Bits(BinaryOperator *Div); 68 bool expandDivisionUpTo64Bits(BinaryOperator *Div);
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-subzero/include/llvm/IR/ |
D | Instruction.def | 124 HANDLE_BINARY_INST(11, Add , BinaryOperator) 125 HANDLE_BINARY_INST(12, FAdd , BinaryOperator) 126 HANDLE_BINARY_INST(13, Sub , BinaryOperator) 127 HANDLE_BINARY_INST(14, FSub , BinaryOperator) 128 HANDLE_BINARY_INST(15, Mul , BinaryOperator) 129 HANDLE_BINARY_INST(16, FMul , BinaryOperator) 130 HANDLE_BINARY_INST(17, UDiv , BinaryOperator) 131 HANDLE_BINARY_INST(18, SDiv , BinaryOperator) 132 HANDLE_BINARY_INST(19, FDiv , BinaryOperator) 133 HANDLE_BINARY_INST(20, URem , BinaryOperator) [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/ |
D | SimplifyIndVar.cpp | 89 void simplifyIVRemainder(BinaryOperator *Rem, Value *IVOperand, 91 void replaceRemWithNumerator(BinaryOperator *Rem); 92 void replaceRemWithNumeratorOrZero(BinaryOperator *Rem); 93 void replaceSRemWithURem(BinaryOperator *Rem); 94 bool eliminateSDiv(BinaryOperator *SDiv); 95 bool strengthenOverflowingOperation(BinaryOperator *OBO, Value *IVOperand); 96 bool strengthenRightShift(BinaryOperator *BO, Value *IVOperand); 126 if (!isa<BinaryOperator>(IVOperand) in foldIVUser() 292 bool SimplifyIndvar::eliminateSDiv(BinaryOperator *SDiv) { in eliminateSDiv() 304 auto *UDiv = BinaryOperator::Create( in eliminateSDiv() [all …]
|
D | IntegerDivision.cpp | 375 bool llvm::expandRemainder(BinaryOperator *Rem) { in expandRemainder() 404 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandRemainder() 417 if (BinaryOperator *UDiv = dyn_cast<BinaryOperator>(Builder.GetInsertPoint())) { in expandRemainder() 433 bool llvm::expandDivision(BinaryOperator *Div) { in expandDivision() 463 BinaryOperator *BO = dyn_cast<BinaryOperator>(Builder.GetInsertPoint()); in expandDivision() 485 bool llvm::expandRemainderUpTo32Bits(BinaryOperator *Rem) { in expandRemainderUpTo32Bits() 526 return expandRemainder(cast<BinaryOperator>(ExtRem)); in expandRemainderUpTo32Bits() 534 bool llvm::expandRemainderUpTo64Bits(BinaryOperator *Rem) { in expandRemainderUpTo64Bits() 574 return expandRemainder(cast<BinaryOperator>(ExtRem)); in expandRemainderUpTo64Bits() 583 bool llvm::expandDivisionUpTo32Bits(BinaryOperator *Div) { in expandDivisionUpTo32Bits() [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/ |
D | Reassociate.cpp | 148 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode) { in isReassociableOp() 152 return cast<BinaryOperator>(I); in isReassociableOp() 156 static BinaryOperator *isReassociableOp(Value *V, unsigned Opcode1, in isReassociableOp() 162 return cast<BinaryOperator>(I); in isReassociableOp() 222 assert(isa<BinaryOperator>(I) && "Expected binary operator."); in canonicalizeOperands() 230 cast<BinaryOperator>(I)->swapOperands(); in canonicalizeOperands() 233 static BinaryOperator *CreateAdd(Value *S1, Value *S2, const Twine &Name, in CreateAdd() 236 return BinaryOperator::CreateAdd(S1, S2, Name, InsertBefore); in CreateAdd() 238 BinaryOperator *Res = in CreateAdd() 239 BinaryOperator::CreateFAdd(S1, S2, Name, InsertBefore); in CreateAdd() [all …]
|
D | CorrelatedValuePropagation.cpp | 492 static bool processBinOp(BinaryOperator *BinOp, LazyValueInfo *LVI); 515 if (auto *BO = dyn_cast<BinaryOperator>(NewOp)) in processOverflowIntrinsic() 523 BinaryOperator *BinOp = BinaryOperator::Create( in processSaturatingInst() 533 if (auto *BO = dyn_cast<BinaryOperator>(BinOp)) in processSaturatingInst() 608 static bool hasPositiveOperands(BinaryOperator *SDI, LazyValueInfo *LVI) { in hasPositiveOperands() 620 static bool processUDivOrURem(BinaryOperator *Instr, LazyValueInfo *LVI) { in processUDivOrURem() 651 if (auto *BinOp = dyn_cast<BinaryOperator>(BO)) in processUDivOrURem() 660 static bool processSRem(BinaryOperator *SDI, LazyValueInfo *LVI) { in processSRem() 665 auto *BO = BinaryOperator::CreateURem(SDI->getOperand(0), SDI->getOperand(1), in processSRem() 682 static bool processSDiv(BinaryOperator *SDI, LazyValueInfo *LVI) { in processSDiv() [all …]
|
D | SeparateConstOffsetFromGEP.cpp | 268 APInt findInEitherOperand(BinaryOperator *BO, bool SignExtended, 320 bool CanTraceInto(bool SignExtended, bool ZeroExtended, BinaryOperator *BO, 486 BinaryOperator *BO, in CanTraceInto() 549 APInt ConstantOffsetExtractor::findInEitherOperand(BinaryOperator *BO, in findInEitherOperand() 586 } else if (BinaryOperator *BO = dyn_cast<BinaryOperator>(V)) { in find() 667 BinaryOperator *BO = cast<BinaryOperator>(U); in distributeExtsAndCloneChain() 673 BinaryOperator *NewBO = nullptr; in distributeExtsAndCloneChain() 675 NewBO = BinaryOperator::Create(BO->getOpcode(), NextInChain, TheOther, in distributeExtsAndCloneChain() 678 NewBO = BinaryOperator::Create(BO->getOpcode(), TheOther, NextInChain, in distributeExtsAndCloneChain() 690 BinaryOperator *BO = cast<BinaryOperator>(UserChain[ChainIndex]); in removeConstOffset() [all …]
|
D | NaryReassociate.cpp | 290 return tryReassociateBinaryOp(cast<BinaryOperator>(I)); in tryReassociate() 437 Instruction *NaryReassociatePass::tryReassociateBinaryOp(BinaryOperator *I) { in tryReassociateBinaryOp() 450 BinaryOperator *I) { in tryReassociateBinaryOp() 475 BinaryOperator *I) { in tryReassociatedBinaryOp() 485 NewI = BinaryOperator::CreateAdd(LHS, RHS, "", I); in tryReassociatedBinaryOp() 488 NewI = BinaryOperator::CreateMul(LHS, RHS, "", I); in tryReassociatedBinaryOp() 497 bool NaryReassociatePass::matchTernaryOp(BinaryOperator *I, Value *V, in matchTernaryOp() 510 const SCEV *NaryReassociatePass::getBinarySCEV(BinaryOperator *I, in getBinarySCEV()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Transforms/Scalar/ |
D | NaryReassociate.h | 89 class BinaryOperator; variable 139 Instruction *tryReassociateBinaryOp(BinaryOperator *I); 144 BinaryOperator *I); 147 BinaryOperator *I); 150 bool matchTernaryOp(BinaryOperator *I, Value *V, Value *&Op1, Value *&Op2); 153 const SCEV *getBinarySCEV(BinaryOperator *I, const SCEV *LHS,
|
D | Reassociate.h | 37 class BinaryOperator; variable 103 void ReassociateExpression(BinaryOperator *I); 104 void RewriteExprTree(BinaryOperator *I, 106 Value *OptimizeExpression(BinaryOperator *I, 119 Value *OptimizeMul(BinaryOperator *I,
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/Analysis/ |
D | Lint.cpp | 108 void visitXor(BinaryOperator &I); 109 void visitSub(BinaryOperator &I); 110 void visitLShr(BinaryOperator &I); 111 void visitAShr(BinaryOperator &I); 112 void visitShl(BinaryOperator &I); 113 void visitSDiv(BinaryOperator &I); 114 void visitUDiv(BinaryOperator &I); 115 void visitSRem(BinaryOperator &I); 116 void visitURem(BinaryOperator &I); 519 void Lint::visitXor(BinaryOperator &I) { in visitXor() [all …]
|
D | PHITransAddr.cpp | 257 bool isNSW = cast<BinaryOperator>(Inst)->hasNoSignedWrap(); in PHITranslateSubExpr() 258 bool isNUW = cast<BinaryOperator>(Inst)->hasNoUnsignedWrap(); in PHITranslateSubExpr() 264 if (BinaryOperator *BOp = dyn_cast<BinaryOperator>(LHS)) in PHITranslateSubExpr() 292 if (BinaryOperator *BO = dyn_cast<BinaryOperator>(U)) in PHITranslateSubExpr() 428 BinaryOperator *Res = BinaryOperator::CreateAdd(OpVal, Inst->getOperand(1), in InsertPHITranslatedSubExpr() 431 Res->setHasNoSignedWrap(cast<BinaryOperator>(Inst)->hasNoSignedWrap()); in InsertPHITranslatedSubExpr() 432 Res->setHasNoUnsignedWrap(cast<BinaryOperator>(Inst)->hasNoUnsignedWrap()); in InsertPHITranslatedSubExpr()
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/include/llvm/CodeGen/ |
D | BasicTTIImpl.h | 1065 BinaryOperator::And, MaskVT); 1150 Cost += ConcreteTTI->getArithmeticInstrCost(BinaryOperator::Or, RetTy); 1151 Cost += ConcreteTTI->getArithmeticInstrCost(BinaryOperator::Sub, RetTy); 1152 Cost += ConcreteTTI->getArithmeticInstrCost(BinaryOperator::Shl, RetTy, 1154 Cost += ConcreteTTI->getArithmeticInstrCost(BinaryOperator::LShr, RetTy, 1159 Cost += ConcreteTTI->getArithmeticInstrCost(BinaryOperator::URem, RetTy, 1165 Cost += ConcreteTTI->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, 1167 Cost += ConcreteTTI->getCmpSelInstrCost(BinaryOperator::Select, RetTy, 1350 Cost += ConcreteTTI->getCmpSelInstrCost(BinaryOperator::ICmp, RetTy, 1352 Cost += 2 * ConcreteTTI->getCmpSelInstrCost(BinaryOperator::Select, RetTy, [all …]
|
/third_party/skia/third_party/externals/swiftshader/third_party/llvm-10.0/llvm/lib/IR/ |
D | Instructions.cpp | 557 AllocSize = BinaryOperator::CreateMul(ArraySize, AllocSize, in createMalloc() 560 AllocSize = BinaryOperator::CreateMul(ArraySize, AllocSize, in createMalloc() 2236 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2, in BinaryOperator() function in BinaryOperator 2240 OperandTraits<BinaryOperator>::op_begin(this), in BinaryOperator() 2241 OperandTraits<BinaryOperator>::operands(this), in BinaryOperator() 2249 BinaryOperator::BinaryOperator(BinaryOps iType, Value *S1, Value *S2, in BinaryOperator() function in BinaryOperator 2253 OperandTraits<BinaryOperator>::op_begin(this), in BinaryOperator() 2254 OperandTraits<BinaryOperator>::operands(this), in BinaryOperator() 2262 void BinaryOperator::AssertOK() { in AssertOK() 2330 BinaryOperator *BinaryOperator::Create(BinaryOps Op, Value *S1, Value *S2, in Create() [all …]
|