[llvm-commits] [Patch][Review Requested][Compilation Time] Use SmallDenseMap instead of DenseMap in LegalizeTypes

Gurd, Preston preston.gurd at intel.com
Thu Jan 24 15:09:14 PST 2013


This is the first of 10 proposed patches to reduce compilation time.

This patch aims to reduce compile time in LegalizeTypes by using SmallDenseMap, with an initial number of elements,  instead of DenseMap, which has zero initial elements, in order to avoid the copying of elements when the size changes and to avoid allocating space every time LegalizeTypes is run. This patch will not affect the memory footprint, because DenseMap will increase the element size to 64 when the first element is added.

Patch by Wan Xiaofei.

PLEASE REVIEW. Thanks!

--
Preston Gurd <preston.gurd at intel.com>
  Intel Waterloo
  SSG/DPD/ECDL/DMP

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130124/856be020/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: SmallDenseMap.patch
Type: application/octet-stream
Size: 3117 bytes
Desc: SmallDenseMap.patch
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130124/856be020/attachment.obj>


More information about the llvm-commits mailing list