aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-02-04 00:14:31 +0000
committerChris Lattner <sabre@nondot.org>2007-02-04 00:14:31 +0000
commitcf5640bd52e919b6fbb06f231122e718f48dbb12 (patch)
tree7b12f28f82339bc6df4862f1c349963a4ac60b2a /lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent7235928b45e6a353f6fcca8b9a40e83ab3420fb0 (diff)
Switch SelectionDAG::ReplaceAllUsesOfValueWith to use a SmallSetVector for
the users set (most nodes have 1 or 2 users). This speeds up the isel pass 3.2% on kimwitu. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@33849 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/SelectionDAG.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 24b49b246c..cced06be1f 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
@@ -2409,8 +2409,9 @@ void SelectionDAG::ReplaceAllUsesOfValueWith(SDOperand From, SDOperand To,
return;
}
- // Get all of the users in a nice, deterministically ordered, uniqued set.
- SetVector<SDNode*> Users(From.Val->use_begin(), From.Val->use_end());
+ // Get all of the users of From.Val. We want these in a nice,
+ // deterministically ordered and uniqued set, so we use a SmallSetVector.
+ SmallSetVector<SDNode*, 16> Users(From.Val->use_begin(), From.Val->use_end());
while (!Users.empty()) {
// We know that this user uses some value of From. If it is the right