Lines Matching refs:Factors

191                                 SmallVectorImpl<Factor> &Factors);
193 SmallVectorImpl<Factor> &Factors);
1119 SmallVector<ValueEntry, 8> Factors; in RemoveFactorFromExpression() local
1120 Factors.reserve(Tree.size()); in RemoveFactorFromExpression()
1123 Factors.append(E.second.getZExtValue(), in RemoveFactorFromExpression()
1129 for (unsigned i = 0, e = Factors.size(); i != e; ++i) { in RemoveFactorFromExpression()
1130 if (Factors[i].Op == Factor) { in RemoveFactorFromExpression()
1132 Factors.erase(Factors.begin()+i); in RemoveFactorFromExpression()
1138 if (ConstantInt *FC2 = dyn_cast<ConstantInt>(Factors[i].Op)) in RemoveFactorFromExpression()
1141 Factors.erase(Factors.begin()+i); in RemoveFactorFromExpression()
1145 if (ConstantFP *FC2 = dyn_cast<ConstantFP>(Factors[i].Op)) { in RemoveFactorFromExpression()
1151 Factors.erase(Factors.begin() + i); in RemoveFactorFromExpression()
1160 RewriteExprTree(BO, Factors); in RemoveFactorFromExpression()
1168 if (Factors.size() == 1) { in RemoveFactorFromExpression()
1170 V = Factors[0].Op; in RemoveFactorFromExpression()
1172 RewriteExprTree(BO, Factors); in RemoveFactorFromExpression()
1187 SmallVectorImpl<Value*> &Factors, in FindSingleUseMultiplyFactors() argument
1191 Factors.push_back(V); in FindSingleUseMultiplyFactors()
1196 FindSingleUseMultiplyFactors(BO->getOperand(1), Factors, Ops); in FindSingleUseMultiplyFactors()
1197 FindSingleUseMultiplyFactors(BO->getOperand(0), Factors, Ops); in FindSingleUseMultiplyFactors()
1604 SmallVector<Value*, 8> Factors; in OptimizeAdd() local
1605 FindSingleUseMultiplyFactors(BOp, Factors, Ops); in OptimizeAdd()
1606 assert(Factors.size() > 1 && "Bad linearize!"); in OptimizeAdd()
1610 for (unsigned i = 0, e = Factors.size(); i != e; ++i) { in OptimizeAdd()
1611 Value *Factor = Factors[i]; in OptimizeAdd()
1735 SmallVectorImpl<Factor> &Factors) { in collectMultiplyFactors() argument
1773 Factors.push_back(Factor(Op, Count)); in collectMultiplyFactors()
1781 std::stable_sort(Factors.begin(), Factors.end(), Factor::PowerDescendingSorter()); in collectMultiplyFactors()
1809 SmallVectorImpl<Factor> &Factors) { in buildMinimalMultiplyDAG() argument
1810 assert(Factors[0].Power); in buildMinimalMultiplyDAG()
1812 for (unsigned LastIdx = 0, Idx = 1, Size = Factors.size(); in buildMinimalMultiplyDAG()
1813 Idx < Size && Factors[Idx].Power > 0; ++Idx) { in buildMinimalMultiplyDAG()
1814 if (Factors[Idx].Power != Factors[LastIdx].Power) { in buildMinimalMultiplyDAG()
1823 InnerProduct.push_back(Factors[LastIdx].Base); in buildMinimalMultiplyDAG()
1825 InnerProduct.push_back(Factors[Idx].Base); in buildMinimalMultiplyDAG()
1827 } while (Idx < Size && Factors[Idx].Power == Factors[LastIdx].Power); in buildMinimalMultiplyDAG()
1831 Value *M = Factors[LastIdx].Base = buildMultiplyTree(Builder, InnerProduct); in buildMinimalMultiplyDAG()
1839 Factors.erase(std::unique(Factors.begin(), Factors.end(), in buildMinimalMultiplyDAG()
1841 Factors.end()); in buildMinimalMultiplyDAG()
1846 for (unsigned Idx = 0, Size = Factors.size(); Idx != Size; ++Idx) { in buildMinimalMultiplyDAG()
1847 if (Factors[Idx].Power & 1) in buildMinimalMultiplyDAG()
1848 OuterProduct.push_back(Factors[Idx].Base); in buildMinimalMultiplyDAG()
1849 Factors[Idx].Power >>= 1; in buildMinimalMultiplyDAG()
1851 if (Factors[0].Power) { in buildMinimalMultiplyDAG()
1852 Value *SquareRoot = buildMinimalMultiplyDAG(Builder, Factors); in buildMinimalMultiplyDAG()
1873 SmallVector<Factor, 4> Factors; in OptimizeMul() local
1874 if (!collectMultiplyFactors(Ops, Factors)) in OptimizeMul()
1878 Value *V = buildMinimalMultiplyDAG(Builder, Factors); in OptimizeMul()