OSDN Git Service

Revert r313782 "[TableGen] Add a DenseMapInfo for MachineValueType."
authorCraig Topper <craig.topper@intel.com>
Thu, 21 Sep 2017 04:54:59 +0000 (04:54 +0000)
committerCraig Topper <craig.topper@intel.com>
Thu, 21 Sep 2017 04:54:59 +0000 (04:54 +0000)
We aren't making a DenseSet/DenseMap of MVT anywhere. This was added due to an earlier revision of D37957.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313858 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/CodeGen/MachineValueType.h

index c248a54..0bdb38b 100644 (file)
@@ -16,7 +16,6 @@
 #define LLVM_CODEGEN_MACHINEVALUETYPE_H
 
 #include "llvm/ADT/iterator_range.h"
-#include "llvm/ADT/DenseMapInfo.h"
 #include "llvm/Support/ErrorHandling.h"
 #include "llvm/Support/MathExtras.h"
 #include <cassert>
@@ -31,8 +30,6 @@ namespace llvm {
   class MVT {
   public:
     enum SimpleValueType : uint8_t {
-      // clang-format off
-
       // Simple value types that aren't explicitly part of this enumeration
       // are considered extended value types.
       INVALID_SIMPLE_VALUE_TYPE = 0,
@@ -201,10 +198,6 @@ namespace llvm {
       // This value must be a multiple of 32.
       MAX_ALLOWED_VALUETYPE = 128,
 
-      // tombstone value used for DenseMap / DenseSet.
-      // This is only for internal use!
-      tombstone      = 247,
-
       // A value of type llvm::TokenTy
       token          = 248,
 
@@ -238,8 +231,6 @@ namespace llvm {
       // Any type. This is used for intrinsics that have overloadings.
       // This is only for tblgen's consumption!
       Any            = 255
-
-      // clang-format on
     };
 
     SimpleValueType SimpleTy = INVALID_SIMPLE_VALUE_TYPE;
@@ -1053,18 +1044,6 @@ namespace llvm {
     /// @}
   };
 
-  template <> struct DenseMapInfo<MVT> {
-    static inline MVT getEmptyKey() {
-      return MVT(MVT::INVALID_SIMPLE_VALUE_TYPE);
-    }
-
-    static inline MVT getTombstoneKey() { return MVT(MVT::tombstone); }
-    static unsigned getHashValue(const MVT &Val) {
-      return unsigned(Val.SimpleTy);
-    }
-    static bool isEqual(const MVT &LHS, const MVT &RHS) { return LHS == RHS; }
-  };
-
 } // end namespace llvm
 
 #endif // LLVM_CODEGEN_MACHINEVALUETYPE_H