[llvm] r279875 - TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC
Justin Bogner via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 26 15:29:36 PDT 2016
Author: bogner
Date: Fri Aug 26 17:29:36 2016
New Revision: 279875
URL: http://llvm.org/viewvc/llvm-project?rev=279875&view=rev
Log:
TableGen: Switch from a std::map to a DenseMap in CodeGenSubRegIndex. NFC
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.
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=279875&r1=279874&r2=279875&view=diff
==============================================================================
--- llvm/trunk/utils/TableGen/CodeGenRegisters.h (original)
+++ llvm/trunk/utils/TableGen/CodeGenRegisters.h Fri Aug 26 17:29:36 2016
@@ -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.
More information about the llvm-commits
mailing list