Lines Matching refs:Factors
1002 SmallVector<ValueEntry, 8> Factors; in RemoveFactorFromExpression() local
1003 Factors.reserve(Tree.size()); in RemoveFactorFromExpression()
1006 Factors.append(E.second.getZExtValue(), in RemoveFactorFromExpression()
1012 for (unsigned i = 0, e = Factors.size(); i != e; ++i) { in RemoveFactorFromExpression()
1013 if (Factors[i].Op == Factor) { in RemoveFactorFromExpression()
1015 Factors.erase(Factors.begin()+i); in RemoveFactorFromExpression()
1021 if (ConstantInt *FC2 = dyn_cast<ConstantInt>(Factors[i].Op)) in RemoveFactorFromExpression()
1024 Factors.erase(Factors.begin()+i); in RemoveFactorFromExpression()
1028 if (ConstantFP *FC2 = dyn_cast<ConstantFP>(Factors[i].Op)) { in RemoveFactorFromExpression()
1034 Factors.erase(Factors.begin() + i); in RemoveFactorFromExpression()
1043 RewriteExprTree(BO, Factors); in RemoveFactorFromExpression()
1051 if (Factors.size() == 1) { in RemoveFactorFromExpression()
1053 V = Factors[0].Op; in RemoveFactorFromExpression()
1055 RewriteExprTree(BO, Factors); in RemoveFactorFromExpression()
1070 SmallVectorImpl<Value*> &Factors, in FindSingleUseMultiplyFactors() argument
1074 Factors.push_back(V); in FindSingleUseMultiplyFactors()
1079 FindSingleUseMultiplyFactors(BO->getOperand(1), Factors, Ops); in FindSingleUseMultiplyFactors()
1080 FindSingleUseMultiplyFactors(BO->getOperand(0), Factors, Ops); in FindSingleUseMultiplyFactors()
1499 SmallVector<Value*, 8> Factors; in OptimizeAdd() local
1500 FindSingleUseMultiplyFactors(BOp, Factors, Ops); in OptimizeAdd()
1501 assert(Factors.size() > 1 && "Bad linearize!"); in OptimizeAdd()
1505 for (unsigned i = 0, e = Factors.size(); i != e; ++i) { in OptimizeAdd()
1506 Value *Factor = Factors[i]; in OptimizeAdd()
1630 SmallVectorImpl<Factor> &Factors) { in collectMultiplyFactors() argument
1668 Factors.push_back(Factor(Op, Count)); in collectMultiplyFactors()
1676 std::stable_sort(Factors.begin(), Factors.end(), in collectMultiplyFactors()
1708 SmallVectorImpl<Factor> &Factors) { in buildMinimalMultiplyDAG() argument
1709 assert(Factors[0].Power); in buildMinimalMultiplyDAG()
1711 for (unsigned LastIdx = 0, Idx = 1, Size = Factors.size(); in buildMinimalMultiplyDAG()
1712 Idx < Size && Factors[Idx].Power > 0; ++Idx) { in buildMinimalMultiplyDAG()
1713 if (Factors[Idx].Power != Factors[LastIdx].Power) { in buildMinimalMultiplyDAG()
1722 InnerProduct.push_back(Factors[LastIdx].Base); in buildMinimalMultiplyDAG()
1724 InnerProduct.push_back(Factors[Idx].Base); in buildMinimalMultiplyDAG()
1726 } while (Idx < Size && Factors[Idx].Power == Factors[LastIdx].Power); in buildMinimalMultiplyDAG()
1730 Value *M = Factors[LastIdx].Base = buildMultiplyTree(Builder, InnerProduct); in buildMinimalMultiplyDAG()
1738 Factors.erase(std::unique(Factors.begin(), Factors.end(), in buildMinimalMultiplyDAG()
1742 Factors.end()); in buildMinimalMultiplyDAG()
1747 for (unsigned Idx = 0, Size = Factors.size(); Idx != Size; ++Idx) { in buildMinimalMultiplyDAG()
1748 if (Factors[Idx].Power & 1) in buildMinimalMultiplyDAG()
1749 OuterProduct.push_back(Factors[Idx].Base); in buildMinimalMultiplyDAG()
1750 Factors[Idx].Power >>= 1; in buildMinimalMultiplyDAG()
1752 if (Factors[0].Power) { in buildMinimalMultiplyDAG()
1753 Value *SquareRoot = buildMinimalMultiplyDAG(Builder, Factors); in buildMinimalMultiplyDAG()
1774 SmallVector<Factor, 4> Factors; in OptimizeMul() local
1775 if (!collectMultiplyFactors(Ops, Factors)) in OptimizeMul()
1779 Value *V = buildMinimalMultiplyDAG(Builder, Factors); in OptimizeMul()