[llvm] r305703 - [Reassociate] Make one of the helper methods static because it doesn't use any class variables. NFC
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 19 09:23:43 PDT 2017
Author: ctopper
Date: Mon Jun 19 11:23:43 2017
New Revision: 305703
URL: http://llvm.org/viewvc/llvm-project?rev=305703&view=rev
Log:
[Reassociate] Make one of the helper methods static because it doesn't use any class variables. NFC
Modified:
llvm/trunk/include/llvm/Transforms/Scalar/Reassociate.h
llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
Modified: llvm/trunk/include/llvm/Transforms/Scalar/Reassociate.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Transforms/Scalar/Reassociate.h?rev=305703&r1=305702&r2=305703&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Transforms/Scalar/Reassociate.h (original)
+++ llvm/trunk/include/llvm/Transforms/Scalar/Reassociate.h Mon Jun 19 11:23:43 2017
@@ -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,
Modified: llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp?rev=305703&r1=305702&r2=305703&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/Reassociate.cpp Mon Jun 19 11:23:43 2017
@@ -1628,8 +1628,8 @@ Value *ReassociatePass::OptimizeAdd(Inst
/// ((((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;
More information about the llvm-commits
mailing list