[llvm] r271503 - [ADT] Remove unused multiply and divide operator overloads on

Chandler Carruth via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 2 01:37:14 PDT 2016


Author: chandlerc
Date: Thu Jun  2 03:37:14 2016
New Revision: 271503

URL: http://llvm.org/viewvc/llvm-project?rev=271503&view=rev
Log:
[ADT] Remove unused multiply and divide operator overloads on
statistics.

Scaling statistics atomically doesn't make any sense anyways, and none
were using these. If you find yourself wanting to do this, you should
probably keep a local count that you scale and then apply that after
scaling to the shared statistic object.

Modified:
    llvm/trunk/include/llvm/ADT/Statistic.h

Modified: llvm/trunk/include/llvm/ADT/Statistic.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ADT/Statistic.h?rev=271503&r1=271502&r2=271503&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ADT/Statistic.h (original)
+++ llvm/trunk/include/llvm/ADT/Statistic.h Thu Jun  2 03:37:14 2016
@@ -100,16 +100,6 @@ public:
     return init();
   }
 
-  const Statistic &operator*=(const unsigned &V) {
-    sys::AtomicMul(&Value, V);
-    return init();
-  }
-
-  const Statistic &operator/=(const unsigned &V) {
-    sys::AtomicDiv(&Value, V);
-    return init();
-  }
-
 #else  // Statistics are disabled in release builds.
 
   const Statistic &operator=(unsigned Val) {
@@ -140,14 +130,6 @@ public:
     return *this;
   }
 
-  const Statistic &operator*=(const unsigned &V) {
-    return *this;
-  }
-
-  const Statistic &operator/=(const unsigned &V) {
-    return *this;
-  }
-
 #endif  // !defined(NDEBUG) || defined(LLVM_ENABLE_STATS)
 
 protected:




More information about the llvm-commits mailing list