This patch aims to reduce compile time in LegalizeTypes by using SmallDenseMap,
authorPreston Gurd <preston.gurd@intel.com>
Fri, 25 Jan 2013 15:18:54 +0000 (15:18 +0000)
committerPreston Gurd <preston.gurd@intel.com>
Fri, 25 Jan 2013 15:18:54 +0000 (15:18 +0000)
commit0959bb707dd0ab28da18f98cd9da60b36be87d7b
treeb8537dabadbf1030cc097627995c776866a86eda
parente8f83dbbd895493b7e8bbf2d7624103a1cb6ad6c
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.

llvm-svn: 173448
llvm/lib/CodeGen/SelectionDAG/LegalizeTypes.h
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp