Lines Matching refs:Factor
81 struct Factor { struct
85 Factor(Value *Base, unsigned Power) : Base(Base), Power(Power) {} in Factor() function
89 bool operator()(const Factor &LHS, const Factor &RHS) { in operator ()()
96 bool operator()(const Factor &LHS, const Factor &RHS) { in operator ()()
180 SmallVectorImpl<Factor> &Factors);
182 SmallVectorImpl<Factor> &Factors);
184 Value *RemoveFactorFromExpression(Value *V, Value *Factor);
1096 Value *Reassociate::RemoveFactorFromExpression(Value *V, Value *Factor) { in RemoveFactorFromExpression() argument
1114 if (Factors[i].Op == Factor) { in RemoveFactorFromExpression()
1121 if (ConstantInt *FC1 = dyn_cast<ConstantInt>(Factor)) { in RemoveFactorFromExpression()
1128 } else if (ConstantFP *FC1 = dyn_cast<ConstantFP>(Factor)) { in RemoveFactorFromExpression()
1594 Value *Factor = Factors[i]; in OptimizeAdd() local
1595 if (!Duplicates.insert(Factor).second) in OptimizeAdd()
1598 unsigned Occ = ++FactorOccurrences[Factor]; in OptimizeAdd()
1601 MaxOccVal = Factor; in OptimizeAdd()
1607 if (ConstantInt *CI = dyn_cast<ConstantInt>(Factor)) { in OptimizeAdd()
1609 Factor = ConstantInt::get(CI->getContext(), -CI->getValue()); in OptimizeAdd()
1610 assert(!Duplicates.count(Factor) && in OptimizeAdd()
1612 unsigned Occ = ++FactorOccurrences[Factor]; in OptimizeAdd()
1615 MaxOccVal = Factor; in OptimizeAdd()
1618 } else if (ConstantFP *CF = dyn_cast<ConstantFP>(Factor)) { in OptimizeAdd()
1622 Factor = ConstantFP::get(CF->getContext(), F); in OptimizeAdd()
1623 assert(!Duplicates.count(Factor) && in OptimizeAdd()
1625 unsigned Occ = ++FactorOccurrences[Factor]; in OptimizeAdd()
1628 MaxOccVal = Factor; in OptimizeAdd()
1718 SmallVectorImpl<Factor> &Factors) { in collectMultiplyFactors()
1756 Factors.push_back(Factor(Op, Count)); in collectMultiplyFactors()
1764 std::stable_sort(Factors.begin(), Factors.end(), Factor::PowerDescendingSorter()); in collectMultiplyFactors()
1792 SmallVectorImpl<Factor> &Factors) { in buildMinimalMultiplyDAG()
1823 Factor::PowerEqual()), in buildMinimalMultiplyDAG()
1856 SmallVector<Factor, 4> Factors; in OptimizeMul()