[PATCH] Switch a std::map to a DenseMap in CodeGenRegisters
Owen Anderson
resistor at mac.com
Tue Feb 10 14:02:38 PST 2015
Hi chandlerc, joker.eph,
As far as I can tell, the keys of the map are unique by pointer address, so there's no need to use the llvm::less comparator. This allows us to use DenseMap instead, which reduces tblgen time by 20% on my stress test.
REPOSITORY
rL LLVM
http://reviews.llvm.org/D7544
Files:
utils/TableGen/CodeGenRegisters.h
Index: utils/TableGen/CodeGenRegisters.h
===================================================================
--- utils/TableGen/CodeGenRegisters.h
+++ utils/TableGen/CodeGenRegisters.h
@@ -74,8 +74,7 @@
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.
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7544.19709.patch
Type: text/x-patch
Size: 610 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150210/2f32563b/attachment.bin>
More information about the llvm-commits
mailing list