[Reassociate] Make one of the helper methods static because it doesn't use any class variables. NFC

llvm-svn: 305703
This commit is contained in:
Craig Topper 2017-06-19 16:23:43 +00:00
parent 314eafb73d
commit 4350734d36
2 changed files with 2 additions and 4 deletions

View File

@ -82,8 +82,6 @@ private:
bool CombineXorOpnd(Instruction *I, reassociate::XorOpnd *Opnd1,
reassociate::XorOpnd *Opnd2, APInt &ConstOpnd,
Value *&Res);
bool collectMultiplyFactors(SmallVectorImpl<reassociate::ValueEntry> &Ops,
SmallVectorImpl<reassociate::Factor> &Factors);
Value *buildMinimalMultiplyDAG(IRBuilder<> &Builder,
SmallVectorImpl<reassociate::Factor> &Factors);
Value *OptimizeMul(BinaryOperator *I,

View File

@ -1628,8 +1628,8 @@ Value *ReassociatePass::OptimizeAdd(Instruction *I,
/// ((((x*y)*x)*y)*x) -> [(x, 3), (y, 2)]
///
/// \returns Whether any factors have a power greater than one.
bool ReassociatePass::collectMultiplyFactors(SmallVectorImpl<ValueEntry> &Ops,
SmallVectorImpl<Factor> &Factors) {
static bool collectMultiplyFactors(SmallVectorImpl<ValueEntry> &Ops,
SmallVectorImpl<Factor> &Factors) {
// FIXME: Have Ops be (ValueEntry, Multiplicity) pairs, simplifying this.
// Compute the sum of powers of simplifiable factors.
unsigned FactorPowerSum = 0;