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)
commitea387fc3b8cf12c3c6ad218b81eca156e8173bba
tree526bd806a2bcde8572e919ecfc6dbc7a92671a5b
parent5928deaf2021b8fd6defa7138e15dc455e492316
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@173448 91177308-0d34-0410-b5e6-96231b3b80d8
lib/CodeGen/SelectionDAG/LegalizeTypes.h
lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp