summaryrefslogtreecommitdiffstats
path: root/llvm/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
commitfeec7137ce1fc151fc7a9206b884f216612e00f5 (patch)
treeb7a8d13986f5a395f4d7d6dcd3334f91cd24fe79 /llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
parent0732bec915063a1a3e1acd59e8bd7b7234affd4e (diff)
downloadbcm5719-llvm-feec7137ce1fc151fc7a9206b884f216612e00f5.tar.gz
bcm5719-llvm-feec7137ce1fc151fc7a9206b884f216612e00f5.zip
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. llvm-svn: 33849
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
index 24b49b246cc..cced06be1f5 100644
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
+++ b/llvm/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
OpenPOWER on IntegriCloud