TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC
authorJustin Bogner <mail@justinbogner.com>
Fri, 26 Aug 2016 22:29:36 +0000 (22:29 +0000)
committerJustin Bogner <mail@justinbogner.com>
Fri, 26 Aug 2016 22:29:36 +0000 (22:29 +0000)
This mapping is between pointers, which DenseMap is particularly good
at. Most targets aren't really affected, but if there's a lot of
subregister composition this can shave off a good chunk of time from
generating registers.

llvm-svn: 279875

llvm/utils/TableGen/CodeGenRegisters.h

index b8d47aa..7a8fa12 100644 (file)
@@ -74,8 +74,7 @@ namespace llvm {
     std::string getQualifiedName() const;
 
     // Map of composite subreg indices.
-    typedef std::map<CodeGenSubRegIndex *, CodeGenSubRegIndex *,
-                     deref<llvm::less>> CompMap;
+    typedef DenseMap<CodeGenSubRegIndex *, CodeGenSubRegIndex *> CompMap;
 
     // Returns the subreg index that results from composing this with Idx.
     // Returns NULL if this and Idx don't compose.