[llvm] r282040 - Revert "TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC"

Justin Bogner via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 20 17:25:45 PDT 2016


Author: bogner
Date: Tue Sep 20 19:25:45 2016
New Revision: 282040

URL: http://llvm.org/viewvc/llvm-project?rev=282040&view=rev
Log:
Revert "TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC"

It turns out we iterate over this map a fair amount and the order
matters for clang to be deterministic. See:

  http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20160919/391315.html

This reverts r279875.

Modified:
    llvm/trunk/utils/TableGen/CodeGenRegisters.h

Modified: llvm/trunk/utils/TableGen/CodeGenRegisters.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/TableGen/CodeGenRegisters.h?rev=282040&r1=282039&r2=282040&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.h Tue Sep 20 19:25:45 2016
@@ -74,7 +74,8 @@ namespace llvm {
     std::string getQualifiedName() const;
 
     // Map of composite subreg indices.
-    typedef DenseMap<CodeGenSubRegIndex *, CodeGenSubRegIndex *> CompMap;
+    typedef std::map<CodeGenSubRegIndex *, CodeGenSubRegIndex *,
+                     deref<llvm::less>> CompMap;
 
     // Returns the subreg index that results from composing this with Idx.
     // Returns NULL if this and Idx don't compose.




More information about the llvm-commits mailing list