Home
last modified time | relevance | path

Searched refs:Divisor (Results 1 – 25 of 86) sorted by relevance

1234

/external/llvm/lib/Transforms/Utils/
DBypassSlowDivision.cpp32 Value *Divisor; member
35 : SignedOp(InSignedOp), Dividend(InDividend), Divisor(InDivisor) {} in DivOpInfo()
53 Val1.Divisor == Val2.Divisor; in isEqual()
66 reinterpret_cast<uintptr_t>(Val.Divisor)) ^ in getHashValue()
83 Value *Divisor = I->getOperand(1); in insertFastDiv() local
85 if (isa<ConstantInt>(Divisor) || in insertFastDiv()
86 (isa<ConstantInt>(Dividend) && isa<ConstantInt>(Divisor))) { in insertFastDiv()
104 SlowQuotientV = SlowBuilder.CreateSDiv(Dividend, Divisor); in insertFastDiv()
105 SlowRemainderV = SlowBuilder.CreateSRem(Dividend, Divisor); in insertFastDiv()
107 SlowQuotientV = SlowBuilder.CreateUDiv(Dividend, Divisor); in insertFastDiv()
[all …]
DIntegerDivision.cpp34 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor, in generateSignedRemainderCode() argument
59 Value *DivisorSign = Builder.CreateAShr(Divisor, Shift); in generateSignedRemainderCode()
61 Value *DvsXor = Builder.CreateXor(Divisor, DivisorSign); in generateSignedRemainderCode()
80 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor, in generatedUnsignedRemainderCode() argument
89 Value *Quotient = Builder.CreateUDiv(Dividend, Divisor); in generatedUnsignedRemainderCode()
90 Value *Product = Builder.CreateMul(Divisor, Quotient); in generatedUnsignedRemainderCode()
104 static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor, in generateSignedDivisionCode() argument
132 Value *Tmp1 = Builder.CreateAShr(Divisor, Shift); in generateSignedDivisionCode()
135 Value *Tmp3 = Builder.CreateXor(Tmp1, Divisor); in generateSignedDivisionCode()
151 static Value *generateUnsignedDivisionCode(Value *Dividend, Value *Divisor, in generateUnsignedDivisionCode() argument
[all …]
/external/webrtc/rtc_base/numerics/
Ddivide_round.h21 template <typename Dividend, typename Divisor>
22 inline auto constexpr DivideRoundUp(Dividend dividend, Divisor divisor) { in DivideRoundUp()
24 static_assert(std::is_integral<Divisor>(), ""); in DivideRoundUp()
33 template <typename Dividend, typename Divisor>
34 inline auto constexpr DivideRoundToNearest(Dividend dividend, Divisor divisor) { in DivideRoundToNearest()
36 static_assert(std::is_integral<Divisor>(), ""); in DivideRoundToNearest()
/external/llvm-project/llvm/lib/Support/
DScaledNumber.cpp58 uint32_t Divisor) { in divide32() argument
60 assert(Divisor && "expected non-zero divisor"); in divide32()
69 uint64_t Quotient = Dividend64 / Divisor; in divide32()
70 uint64_t Remainder = Dividend64 % Divisor; in divide32()
77 return getRounded<uint32_t>(Quotient, Shift, Remainder >= getHalf(Divisor)); in divide32()
81 uint64_t Divisor) { in divide64() argument
83 assert(Divisor && "expected non-zero divisor"); in divide64()
87 if (int Zeros = countTrailingZeros(Divisor)) { in divide64()
89 Divisor >>= Zeros; in divide64()
93 if (Divisor == 1) in divide64()
[all …]
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Support/
DScaledNumber.cpp58 uint32_t Divisor) { in divide32() argument
60 assert(Divisor && "expected non-zero divisor"); in divide32()
69 uint64_t Quotient = Dividend64 / Divisor; in divide32()
70 uint64_t Remainder = Dividend64 % Divisor; in divide32()
77 return getRounded<uint32_t>(Quotient, Shift, Remainder >= getHalf(Divisor)); in divide32()
81 uint64_t Divisor) { in divide64() argument
83 assert(Divisor && "expected non-zero divisor"); in divide64()
87 if (int Zeros = countTrailingZeros(Divisor)) { in divide64()
89 Divisor >>= Zeros; in divide64()
93 if (Divisor == 1) in divide64()
[all …]
/external/llvm/lib/Support/
DScaledNumber.cpp59 uint32_t Divisor) { in divide32() argument
61 assert(Divisor && "expected non-zero divisor"); in divide32()
70 uint64_t Quotient = Dividend64 / Divisor; in divide32()
71 uint64_t Remainder = Dividend64 % Divisor; in divide32()
78 return getRounded<uint32_t>(Quotient, Shift, Remainder >= getHalf(Divisor)); in divide32()
82 uint64_t Divisor) { in divide64() argument
84 assert(Divisor && "expected non-zero divisor"); in divide64()
88 if (int Zeros = countTrailingZeros(Divisor)) { in divide64()
90 Divisor >>= Zeros; in divide64()
94 if (Divisor == 1) in divide64()
[all …]
/external/grpc-grpc/src/csharp/Grpc.Examples/
DMathExamples.cs29 DivReply result = client.Div(new DivArgs { Dividend = 10, Divisor = 3 }); in DivExample()
35 DivReply result = await client.DivAsync(new DivArgs { Dividend = 4, Divisor = 5 }); in DivAsyncExample()
68 new DivArgs { Dividend = 10, Divisor = 3 }, in DivManyExample()
69 new DivArgs { Dividend = 100, Divisor = 21 }, in DivManyExample()
70 new DivArgs { Dividend = 7, Divisor = 2 } in DivManyExample()
95 …DivReply result = await client.DivAsync(new DivArgs { Dividend = sum.Num_, Divisor = numbers.Count… in DependendRequestsExample()
106 DivReply result = await client.DivAsync(new DivArgs { Dividend = 5, Divisor = 0 }); in HandleErrorExample()
125 var call = client.DivAsync(new DivArgs { Dividend = 5, Divisor = 0 }, requestHeaders); in MetadataExample()
DMath.cs100 public long Divisor { property in Math.DivArgs
121 if (Divisor != other.Divisor) return false; in Equals()
129 if (Divisor != 0L) hash ^= Divisor.GetHashCode(); in GetHashCode()
147 if (Divisor != 0L) { in WriteTo()
149 output.WriteInt64(Divisor); in WriteTo()
162 if (Divisor != 0L) { in CalculateSize()
163 size += 1 + pb::CodedOutputStream.ComputeInt64Size(Divisor); in CalculateSize()
179 if (other.Divisor != 0L) { in MergeFrom()
180 Divisor = other.Divisor; in MergeFrom()
198 Divisor = input.ReadInt64(); in MergeFrom()
DMathServiceImpl.cs70 if (args.Divisor == 0) in DivInternal()
77 long quotient = args.Dividend / args.Divisor; in DivInternal()
78 long remainder = args.Dividend % args.Divisor; in DivInternal()
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Transforms/Utils/
DBypassSlowDivision.h33 AssertingVH<Value> Divisor; member
38 : SignedOp(InSignedOp), Dividend(InDividend), Divisor(InDivisor) {} in DivRemMapKey()
44 Val1.Divisor == Val2.Divisor;
59 static_cast<Value *>(Val.Divisor))) ^
/external/llvm-project/llvm/include/llvm/Transforms/Utils/
DBypassSlowDivision.h33 AssertingVH<Value> Divisor; member
38 : SignedOp(InSignedOp), Dividend(InDividend), Divisor(InDivisor) {} in DivRemMapKey()
44 Val1.Divisor == Val2.Divisor;
59 static_cast<Value *>(Val.Divisor))) ^
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Utils/
DBypassSlowDivision.cpp158 Value *Divisor = SlowDivOrRem->getOperand(1); in getReplacement() local
159 DivRemMapKey Key(isSignedOp(), Dividend, Divisor); in getReplacement()
269 Value *Divisor = SlowDivOrRem->getOperand(1); in createSlowBB() local
272 DivRemPair.Quotient = Builder.CreateSDiv(Dividend, Divisor); in createSlowBB()
273 DivRemPair.Remainder = Builder.CreateSRem(Dividend, Divisor); in createSlowBB()
275 DivRemPair.Quotient = Builder.CreateUDiv(Dividend, Divisor); in createSlowBB()
276 DivRemPair.Remainder = Builder.CreateURem(Dividend, Divisor); in createSlowBB()
292 Value *Divisor = SlowDivOrRem->getOperand(1); in createFastBB() local
294 Builder.CreateCast(Instruction::Trunc, Divisor, BypassType); in createFastBB()
352 Value *Divisor = SlowDivOrRem->getOperand(1); in insertFastDivAndRem() local
[all …]
DIntegerDivision.cpp33 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor, in generateSignedRemainderCode() argument
58 Value *DivisorSign = Builder.CreateAShr(Divisor, Shift); in generateSignedRemainderCode()
60 Value *DvsXor = Builder.CreateXor(Divisor, DivisorSign); in generateSignedRemainderCode()
79 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor, in generatedUnsignedRemainderCode() argument
88 Value *Quotient = Builder.CreateUDiv(Dividend, Divisor); in generatedUnsignedRemainderCode()
89 Value *Product = Builder.CreateMul(Divisor, Quotient); in generatedUnsignedRemainderCode()
103 static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor, in generateSignedDivisionCode() argument
131 Value *Tmp1 = Builder.CreateAShr(Divisor, Shift); in generateSignedDivisionCode()
134 Value *Tmp3 = Builder.CreateXor(Tmp1, Divisor); in generateSignedDivisionCode()
150 static Value *generateUnsignedDivisionCode(Value *Dividend, Value *Divisor, in generateUnsignedDivisionCode() argument
[all …]
/external/llvm-project/llvm/lib/Transforms/Utils/
DBypassSlowDivision.cpp158 Value *Divisor = SlowDivOrRem->getOperand(1); in getReplacement() local
159 DivRemMapKey Key(isSignedOp(), Dividend, Divisor); in getReplacement()
269 Value *Divisor = SlowDivOrRem->getOperand(1); in createSlowBB() local
272 DivRemPair.Quotient = Builder.CreateSDiv(Dividend, Divisor); in createSlowBB()
273 DivRemPair.Remainder = Builder.CreateSRem(Dividend, Divisor); in createSlowBB()
275 DivRemPair.Quotient = Builder.CreateUDiv(Dividend, Divisor); in createSlowBB()
276 DivRemPair.Remainder = Builder.CreateURem(Dividend, Divisor); in createSlowBB()
293 Value *Divisor = SlowDivOrRem->getOperand(1); in createFastBB() local
295 Builder.CreateCast(Instruction::Trunc, Divisor, BypassType); in createFastBB()
355 Value *Divisor = SlowDivOrRem->getOperand(1); in insertFastDivAndRem() local
[all …]
DIntegerDivision.cpp33 static Value *generateSignedRemainderCode(Value *Dividend, Value *Divisor, in generateSignedRemainderCode() argument
58 Value *DivisorSign = Builder.CreateAShr(Divisor, Shift); in generateSignedRemainderCode()
60 Value *DvsXor = Builder.CreateXor(Divisor, DivisorSign); in generateSignedRemainderCode()
79 static Value *generatedUnsignedRemainderCode(Value *Dividend, Value *Divisor, in generatedUnsignedRemainderCode() argument
88 Value *Quotient = Builder.CreateUDiv(Dividend, Divisor); in generatedUnsignedRemainderCode()
89 Value *Product = Builder.CreateMul(Divisor, Quotient); in generatedUnsignedRemainderCode()
103 static Value *generateSignedDivisionCode(Value *Dividend, Value *Divisor, in generateSignedDivisionCode() argument
131 Value *Tmp1 = Builder.CreateAShr(Divisor, Shift); in generateSignedDivisionCode()
134 Value *Tmp3 = Builder.CreateXor(Tmp1, Divisor); in generateSignedDivisionCode()
150 static Value *generateUnsignedDivisionCode(Value *Dividend, Value *Divisor, in generateUnsignedDivisionCode() argument
[all …]
/external/grpc-grpc/src/csharp/Grpc.Examples.Tests/
DMathClientServerTests.cs64 DivReply response = client.Div(new DivArgs { Dividend = 10, Divisor = 3 }); in Div1()
72 DivReply response = client.Div(new DivArgs { Dividend = 0, Divisor = 1 }); in Div2()
80 … var ex = Assert.Throws<RpcException>(() => client.Div(new DivArgs { Dividend = 0, Divisor = 0 })); in DivByZero()
87 DivReply response = await client.DivAsync(new DivArgs { Dividend = 10, Divisor = 3 }); in DivAsync()
164 new DivArgs { Dividend = 10, Divisor = 3 }, in DivMany()
165 new DivArgs { Dividend = 100, Divisor = 21 }, in DivMany()
166 new DivArgs { Dividend = 7, Divisor = 2 } in DivMany()
/external/llvm/include/llvm/Support/
DScaledNumber.h139 std::pair<uint64_t, int16_t> divide64(uint64_t Dividend, uint64_t Divisor);
146 std::pair<uint32_t, int16_t> divide32(uint32_t Dividend, uint32_t Divisor);
154 std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) { in getQuotient() argument
162 if (!Divisor) in getQuotient()
166 return divide64(Dividend, Divisor); in getQuotient()
167 return divide32(Dividend, Divisor); in getQuotient()
172 uint32_t Divisor) { in getQuotient32() argument
173 return getQuotient(Dividend, Divisor); in getQuotient32()
178 uint64_t Divisor) { in getQuotient64() argument
179 return getQuotient(Dividend, Divisor); in getQuotient64()
[all …]
/external/llvm-project/llvm/include/llvm/Support/
DScaledNumber.h138 std::pair<uint64_t, int16_t> divide64(uint64_t Dividend, uint64_t Divisor);
145 std::pair<uint32_t, int16_t> divide32(uint32_t Dividend, uint32_t Divisor);
153 std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) { in getQuotient() argument
161 if (!Divisor) in getQuotient()
165 return divide64(Dividend, Divisor); in getQuotient()
166 return divide32(Dividend, Divisor); in getQuotient()
171 uint32_t Divisor) { in getQuotient32() argument
172 return getQuotient(Dividend, Divisor); in getQuotient32()
177 uint64_t Divisor) { in getQuotient64() argument
178 return getQuotient(Dividend, Divisor); in getQuotient64()
[all …]
DAlignment.h337 inline Align operator/(Align Lhs, uint64_t Divisor) {
338 assert(llvm::isPowerOf2_64(Divisor) &&
341 return Align(Lhs.value() / Divisor);
344 inline MaybeAlign operator/(MaybeAlign Lhs, uint64_t Divisor) {
345 assert(llvm::isPowerOf2_64(Divisor) &&
347 return Lhs ? Lhs.getValue() / Divisor : MaybeAlign();
/external/swiftshader/third_party/llvm-10.0/llvm/include/llvm/Support/
DScaledNumber.h138 std::pair<uint64_t, int16_t> divide64(uint64_t Dividend, uint64_t Divisor);
145 std::pair<uint32_t, int16_t> divide32(uint32_t Dividend, uint32_t Divisor);
153 std::pair<DigitsT, int16_t> getQuotient(DigitsT Dividend, DigitsT Divisor) { in getQuotient() argument
161 if (!Divisor) in getQuotient()
165 return divide64(Dividend, Divisor); in getQuotient()
166 return divide32(Dividend, Divisor); in getQuotient()
171 uint32_t Divisor) { in getQuotient32() argument
172 return getQuotient(Dividend, Divisor); in getQuotient32()
177 uint64_t Divisor) { in getQuotient64() argument
178 return getQuotient(Dividend, Divisor); in getQuotient64()
[all …]
/external/llvm-project/polly/lib/Support/
DSCEVValidator.cpp377 ValidatorResult visitDivision(const SCEV *Dividend, const SCEV *Divisor, in visitDivision()
384 if (isa<SCEVConstant>(Divisor) && !Divisor->isZero()) in visitDivision()
393 ValidatorResult RHS = visit(Divisor); in visitDivision()
407 auto *Divisor = Expr->getRHS(); in visitUDivExpr() local
408 return visitDivision(Dividend, Divisor, Expr); in visitUDivExpr()
416 auto *Divisor = SE.getSCEV(SDiv->getOperand(1)); in visitSDivInstruction() local
417 return visitDivision(Dividend, Divisor, Expr, SDiv); in visitSDivInstruction()
424 auto *Divisor = SRem->getOperand(1); in visitSRemInstruction() local
425 auto *CI = dyn_cast<ConstantInt>(Divisor); in visitSRemInstruction()
603 auto *Divisor = SE.getSCEV(Inst->getOperand(0)); in follow() local
[all …]
DSCEVAffinator.cpp477 auto *Divisor = Expr->getRHS(); in visitUDivExpr() local
478 assert(isa<SCEVConstant>(Divisor) && in visitUDivExpr()
482 auto DivisorPWAC = visit(Divisor); in visitUDivExpr()
484 if (SE.isKnownNegative(Divisor)) { in visitUDivExpr()
510 auto *Divisor = SDiv->getOperand(1); in visitSDivInstruction() local
511 auto *DivisorSCEV = SE.getSCEVAtScope(Divisor, Scope); in visitSDivInstruction()
527 auto *Divisor = SRem->getOperand(1); in visitSRemInstruction() local
528 auto *DivisorSCEV = SE.getSCEVAtScope(Divisor, Scope); in visitSRemInstruction()
530 assert(isa<ConstantInt>(Divisor) && in visitSRemInstruction()
/external/swiftshader/third_party/llvm-10.0/llvm/lib/Transforms/Scalar/
DDivRemPairs.cpp56 Value *Divisor; in matchExpandedRem() local
61 m_c_Mul(m_CombineAnd(m_IDiv(m_Specific(Dividend), m_Value(Divisor)), in matchExpandedRem()
63 m_Deferred(Divisor)))) in matchExpandedRem()
69 M.Key.Divisor = Divisor; in matchExpandedRem()
/external/llvm/lib/CodeGen/
DTargetSchedule.cpp38 static unsigned gcd(unsigned Dividend, unsigned Divisor) { in gcd() argument
40 while(Divisor) { in gcd()
41 unsigned Rem = Dividend % Divisor; in gcd()
42 Dividend = Divisor; in gcd()
43 Divisor = Rem; in gcd()
/external/llvm-project/llvm/lib/Transforms/Scalar/
DDivRemPairs.cpp57 Value *Divisor; in matchExpandedRem() local
62 m_c_Mul(m_CombineAnd(m_IDiv(m_Specific(Dividend), m_Value(Divisor)), in matchExpandedRem()
64 m_Deferred(Divisor)))) in matchExpandedRem()
70 M.Key.Divisor = Divisor; in matchExpandedRem()

1234