Lines Matching defs:Q

196         Q.push_back(V);
200 Value *V = Q.front();
201 Q.pop_front();
206 bool empty() const { return Q.empty(); }
209 std::deque<Value *> Q;
288 WorkListType Q;
289 Q.push_back(V);
291 while (!Q.empty()) {
292 Instruction *U = dyn_cast<Instruction>(Q.pop_front_val());
298 Q.push_back(Op);
334 WorkListType Q;
335 Q.push_back(Exp);
337 while (!Q.empty()) {
338 Value *V = Q.pop_front_val();
345 Q.push_back(Op);
402 WorkListType Q;
403 Q.push_back(Tree);
404 while (!Q.empty()) {
405 Instruction *U = dyn_cast<Instruction>(Q.pop_front_val());
415 Q.push_back(Op);
435 WorkListType Q;
436 Q.push_back(NewV);
437 while (!Q.empty()) {
438 Value *V = Q.pop_front_val();
447 Q.push_back(Op);
496 WorkListType Q;
497 Q.push_back(Tree);
499 while (!Q.empty()) {
500 Value *V = Q.pop_front_val();
510 Q.push_back(Op);
536 WorkListType Q;
537 Q.push_back(C.Root);
541 while (!Q.empty()) {
544 Instruction *U = dyn_cast<Instruction>(Q.pop_front_val());
555 Q.push_back(C.Root);
560 Q.push_back(Op);
613 Value *Q = nullptr;
686 // select (X & (1 << i)) != 0 ? R ^ (Q << i) : R
687 // select (X & (1 << i)) == 0 ? R : R ^ (Q << i)
689 // select (X & (1 << i)) == (1 << i) ? R ^ (Q << i) : R
690 // select (X & (1 << i)) != (1 << i) ? R : R ^ (Q << i);
746 Value *Q = nullptr, *R = nullptr, *Y = nullptr, *Z = nullptr;
783 // For now, check against (Q << i).
784 if (!match(T, m_Shl(m_Value(Q), m_Specific(CIV))) &&
785 !match(T, m_Shl(m_ZExt(m_Value(Q)), m_ZExt(m_Specific(CIV)))))
787 // Matched: select +++ ? R : R ^ (Q << i)
788 // select +++ ? R ^ (Q << i) : R
791 PV.Q = Q;
800 // select (X & 1) != 0 ? (R >> 1) ^ Q : (R >> 1)
801 // select (X & 1) == 0 ? (R >> 1) : (R >> 1) ^ Q
803 // select (X & 1) == 1 ? (R >> 1) ^ Q : (R >> 1)
804 // select (X & 1) != 1 ? (R >> 1) : (R >> 1) ^ Q
837 Value *R = nullptr, *Q = nullptr;
844 if (!match(FalseV, m_c_Xor(m_Specific(TrueV), m_Value(Q))))
846 // Matched: select +++ ? (R >> 1) : (R >> 1) ^ Q
854 if (!match(TrueV, m_c_Xor(m_Specific(FalseV), m_Value(Q))))
856 // Matched: select +++ ? (R >> 1) ^ Q : (R >> 1)
861 PV.Q = Q;
872 // The basic pattern for R = P.Q is:
876 // R' = R ^ (Q << i)
878 // Similarly, the basic pattern for R = (P/Q).Q - P
882 // R' = R ^ (Q << i)
884 // There exist idioms, where instead of Q being shifted left, P is shifted
888 // For R = P.Q, this would be:
892 // R' = (R >> 1) ^ Q ; R is cycled through the loop, so it must
900 // R' = (R >> 1) ^ Q
905 // select (X & (1 << i)) ? R ^ (Q << i) : R
907 // select (X & 1) ? (R >> 1) ^ Q
961 // If this is an inverse pattern, the Q polynomial must be known at
963 if (PV.Inv && !isa<ConstantInt>(PV.Q))
1460 for (auto P = ExitB->begin(), Q = ExitB->end(); P != Q; ++P) {
1489 // Arrays of coefficients of Q and the inverse, C.
1490 // Q[i] = coefficient at x^i.
1491 std::array<char,32> Q, C;
1494 Q[i] = QP & 1;
1497 assert(Q[0] == 1);
1500 // (Q[n]*x^n + ... + Q[1]*x + Q[0]) * (C[n]*x^n + ... + C[1]*x + C[0]) = 1
1502 // For it to have a solution, Q[0] must be 1. Since this is Z2[x], the
1508 // C[0] = 1, since C[0] = Q[0], and Q[0] = 1.
1512 // C[0]Q[i] ^ C[1]Q[i-1] ^ ... ^ C[i-1]Q[1] ^ C[i]Q[0] = 0
1514 // C[0]Q[i] ^ C[1]Q[i-1] ^ ... ^ C[i-1]Q[1] ^ C[i] = 0
1516 // C[0]Q[i] ^ C[1]Q[i-1] ^ ... ^ C[i-1]Q[1] = C[i]
1519 T = T ^ (C[j] & Q[i-j]);
1537 Value *P = PV.P, *Q = PV.Q, *P0 = P;
1550 auto *QI = dyn_cast<ConstantInt>(PV.Q);
1564 Value *R = B.CreateCall(PMF, {P, Q});
1892 dbgs() << "Found pmpy idiom: R = " << PP << ".Q\n";
1894 dbgs() << "Found inverse pmpy idiom: R = (" << PP << "/Q).Q) + "
1899 dbgs() << " Q:" << *PV.Q << "\n";