Lines Matching refs:Factors

180                                 SmallVectorImpl<Factor> &Factors);
182 SmallVectorImpl<Factor> &Factors);
1103 SmallVector<ValueEntry, 8> Factors; in RemoveFactorFromExpression() local
1104 Factors.reserve(Tree.size()); in RemoveFactorFromExpression()
1107 Factors.append(E.second.getZExtValue(), in RemoveFactorFromExpression()
1113 for (unsigned i = 0, e = Factors.size(); i != e; ++i) { in RemoveFactorFromExpression()
1114 if (Factors[i].Op == Factor) { in RemoveFactorFromExpression()
1116 Factors.erase(Factors.begin()+i); in RemoveFactorFromExpression()
1122 if (ConstantInt *FC2 = dyn_cast<ConstantInt>(Factors[i].Op)) in RemoveFactorFromExpression()
1125 Factors.erase(Factors.begin()+i); in RemoveFactorFromExpression()
1129 if (ConstantFP *FC2 = dyn_cast<ConstantFP>(Factors[i].Op)) { in RemoveFactorFromExpression()
1135 Factors.erase(Factors.begin() + i); in RemoveFactorFromExpression()
1144 RewriteExprTree(BO, Factors); in RemoveFactorFromExpression()
1152 if (Factors.size() == 1) { in RemoveFactorFromExpression()
1154 V = Factors[0].Op; in RemoveFactorFromExpression()
1156 RewriteExprTree(BO, Factors); in RemoveFactorFromExpression()
1171 SmallVectorImpl<Value*> &Factors, in FindSingleUseMultiplyFactors() argument
1175 Factors.push_back(V); in FindSingleUseMultiplyFactors()
1180 FindSingleUseMultiplyFactors(BO->getOperand(1), Factors, Ops); in FindSingleUseMultiplyFactors()
1181 FindSingleUseMultiplyFactors(BO->getOperand(0), Factors, Ops); in FindSingleUseMultiplyFactors()
1587 SmallVector<Value*, 8> Factors; in OptimizeAdd() local
1588 FindSingleUseMultiplyFactors(BOp, Factors, Ops); in OptimizeAdd()
1589 assert(Factors.size() > 1 && "Bad linearize!"); in OptimizeAdd()
1593 for (unsigned i = 0, e = Factors.size(); i != e; ++i) { in OptimizeAdd()
1594 Value *Factor = Factors[i]; in OptimizeAdd()
1718 SmallVectorImpl<Factor> &Factors) { in collectMultiplyFactors() argument
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() argument
1793 assert(Factors[0].Power); in buildMinimalMultiplyDAG()
1795 for (unsigned LastIdx = 0, Idx = 1, Size = Factors.size(); in buildMinimalMultiplyDAG()
1796 Idx < Size && Factors[Idx].Power > 0; ++Idx) { in buildMinimalMultiplyDAG()
1797 if (Factors[Idx].Power != Factors[LastIdx].Power) { in buildMinimalMultiplyDAG()
1806 InnerProduct.push_back(Factors[LastIdx].Base); in buildMinimalMultiplyDAG()
1808 InnerProduct.push_back(Factors[Idx].Base); in buildMinimalMultiplyDAG()
1810 } while (Idx < Size && Factors[Idx].Power == Factors[LastIdx].Power); in buildMinimalMultiplyDAG()
1814 Value *M = Factors[LastIdx].Base = buildMultiplyTree(Builder, InnerProduct); in buildMinimalMultiplyDAG()
1822 Factors.erase(std::unique(Factors.begin(), Factors.end(), in buildMinimalMultiplyDAG()
1824 Factors.end()); in buildMinimalMultiplyDAG()
1829 for (unsigned Idx = 0, Size = Factors.size(); Idx != Size; ++Idx) { in buildMinimalMultiplyDAG()
1830 if (Factors[Idx].Power & 1) in buildMinimalMultiplyDAG()
1831 OuterProduct.push_back(Factors[Idx].Base); in buildMinimalMultiplyDAG()
1832 Factors[Idx].Power >>= 1; in buildMinimalMultiplyDAG()
1834 if (Factors[0].Power) { in buildMinimalMultiplyDAG()
1835 Value *SquareRoot = buildMinimalMultiplyDAG(Builder, Factors); in buildMinimalMultiplyDAG()
1856 SmallVector<Factor, 4> Factors; in OptimizeMul() local
1857 if (!collectMultiplyFactors(Ops, Factors)) in OptimizeMul()
1861 Value *V = buildMinimalMultiplyDAG(Builder, Factors); in OptimizeMul()