Lines Matching refs:Factor

79   struct Factor {
83 Factor(Value *Base, unsigned Power) : Base(Base), Power(Power) {}
87 bool operator()(const Factor &LHS, const Factor &RHS) {
94 bool operator()(const Factor &LHS, const Factor &RHS) {
101 bool operator()(const Factor &LHS, const Factor &RHS) {
108 bool operator()(const Factor &LHS, const Factor &RHS) {
190 SmallVectorImpl<Factor> &Factors);
192 SmallVectorImpl<Factor> &Factors);
194 Value *RemoveFactorFromExpression(Value *V, Value *Factor);
996 /// multiplication sequence, and if this sequence contains a multiply by Factor,
997 /// remove Factor from the tree and return the new tree.
998 Value *Reassociate::RemoveFactorFromExpression(Value *V, Value *Factor) {
1015 if (Factors[i].Op == Factor) {
1022 if (ConstantInt *FC1 = dyn_cast<ConstantInt>(Factor))
1464 Value *Factor = Factors[i];
1465 if (!Duplicates.insert(Factor)) continue;
1467 unsigned Occ = ++FactorOccurrences[Factor];
1468 if (Occ > MaxOcc) { MaxOcc = Occ; MaxOccVal = Factor; }
1470 // If Factor is a negative constant, add the negated value as a factor
1473 if (ConstantInt *CI = dyn_cast<ConstantInt>(Factor))
1475 Factor = ConstantInt::get(CI->getContext(), -CI->getValue());
1476 assert(!Duplicates.count(Factor) &&
1479 unsigned Occ = ++FactorOccurrences[Factor];
1480 if (Occ > MaxOcc) { MaxOcc = Occ; MaxOccVal = Factor; }
1576 SmallVectorImpl<Factor> &Factors) {
1614 Factors.push_back(Factor(Op, Count));
1622 std::sort(Factors.begin(), Factors.end(), Factor::PowerDescendingSorter());
1647 SmallVectorImpl<Factor> &Factors) {
1678 Factor::PowerEqual()),
1711 SmallVector<Factor, 4> Factors;