diff options
author | Preston Gurd <preston.gurd@intel.com> | 2013-01-25 15:18:54 +0000 |
---|---|---|
committer | Preston Gurd <preston.gurd@intel.com> | 2013-01-25 15:18:54 +0000 |
commit | ea387fc3b8cf12c3c6ad218b81eca156e8173bba (patch) | |
tree | 526bd806a2bcde8572e919ecfc6dbc7a92671a5b /lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | |
parent | 5928deaf2021b8fd6defa7138e15dc455e492316 (diff) |
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp b/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp index 3989295ff5..5d547ed225 100644 --- a/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp +++ b/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp @@ -40,7 +40,7 @@ class VectorLegalizer { /// LegalizedNodes - For nodes that are of legal width, and that have more /// than one use, this map indicates what regularized operand to use. This /// allows us to avoid legalizing the same thing more than once. - DenseMap<SDValue, SDValue> LegalizedNodes; + SmallDenseMap<SDValue, SDValue, 64> LegalizedNodes; // Adds a node to the translation cache void AddLegalizedOperand(SDValue From, SDValue To) { |