diff options
| author | Craig Topper <craig.topper@intel.com> | 2017-06-19 16:23:43 +0000 |
|---|---|---|
| committer | Craig Topper <craig.topper@intel.com> | 2017-06-19 16:23:43 +0000 |
| commit | 4350734d36dad4e1eed915f3c12984cca2dbcd5a (patch) | |
| tree | dfcd01355050d09cffd11bc8cfd6cacc9a33a0ff | |
| parent | 314eafb73d5ab91ea54a136e126d42bfcec61a63 (diff) | |
| download | bcm5719-llvm-4350734d36dad4e1eed915f3c12984cca2dbcd5a.tar.gz bcm5719-llvm-4350734d36dad4e1eed915f3c12984cca2dbcd5a.zip | |
[Reassociate] Make one of the helper methods static because it doesn't use any class variables. NFC
llvm-svn: 305703
| -rw-r--r-- | llvm/include/llvm/Transforms/Scalar/Reassociate.h | 2 | ||||
| -rw-r--r-- | llvm/lib/Transforms/Scalar/Reassociate.cpp | 4 |
2 files changed, 2 insertions, 4 deletions
diff --git a/llvm/include/llvm/Transforms/Scalar/Reassociate.h b/llvm/include/llvm/Transforms/Scalar/Reassociate.h index 7b68b448930..a30a7176baa 100644 --- a/llvm/include/llvm/Transforms/Scalar/Reassociate.h +++ b/llvm/include/llvm/Transforms/Scalar/Reassociate.h @@ -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, diff --git a/llvm/lib/Transforms/Scalar/Reassociate.cpp b/llvm/lib/Transforms/Scalar/Reassociate.cpp index 4b543b6d04d..4ce32e0eca7 100644 --- a/llvm/lib/Transforms/Scalar/Reassociate.cpp +++ b/llvm/lib/Transforms/Scalar/Reassociate.cpp @@ -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; |

