[llvm-commits] CVS: llvm/include/llvm/CodeGen/SelectionDAG.h SelectionDAGNodes.h
Chris Lattner
lattner at cs.uiuc.edu
Wed Aug 16 14:01:25 PDT 2006
Changes in directory llvm/include/llvm/CodeGen:
SelectionDAG.h updated: 1.123 -> 1.124
SelectionDAGNodes.h updated: 1.142 -> 1.143
---
Log message:
Change the use_list to be a smallvector instead of a vector. This reduces
isel time from 6.79s to 5.53s (22%) on kc++ with a release build on ppc.
Go smallvector! :)
---
Diffs of the changes: (+4 -3)
SelectionDAG.h | 1 +
SelectionDAGNodes.h | 6 +++---
2 files changed, 4 insertions(+), 3 deletions(-)
Index: llvm/include/llvm/CodeGen/SelectionDAG.h
diff -u llvm/include/llvm/CodeGen/SelectionDAG.h:1.123 llvm/include/llvm/CodeGen/SelectionDAG.h:1.124
--- llvm/include/llvm/CodeGen/SelectionDAG.h:1.123 Tue Aug 15 14:11:05 2006
+++ llvm/include/llvm/CodeGen/SelectionDAG.h Wed Aug 16 16:01:10 2006
@@ -20,6 +20,7 @@
#include "llvm/ADT/ilist"
#include <list>
+#include <vector>
#include <map>
#include <set>
#include <string>
Index: llvm/include/llvm/CodeGen/SelectionDAGNodes.h
diff -u llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.142 llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.143
--- llvm/include/llvm/CodeGen/SelectionDAGNodes.h:1.142 Tue Aug 15 14:11:05 2006
+++ llvm/include/llvm/CodeGen/SelectionDAGNodes.h Wed Aug 16 16:01:10 2006
@@ -23,9 +23,9 @@
#include "llvm/Value.h"
#include "llvm/ADT/GraphTraits.h"
#include "llvm/ADT/iterator"
+#include "llvm/ADT/SmallVector.h"
#include "llvm/Support/DataTypes.h"
#include <cassert>
-#include <vector>
namespace llvm {
@@ -722,7 +722,7 @@
/// Uses - These are all of the SDNode's that use a value produced by this
/// node.
- std::vector<SDNode*> Uses;
+ SmallVector<SDNode*,3> Uses;
// Out-of-line virtual method to give class a home.
virtual void ANCHOR();
@@ -751,7 +751,7 @@
///
int getNodeId() const { return NodeId; }
- typedef std::vector<SDNode*>::const_iterator use_iterator;
+ typedef SmallVector<SDNode*,3>::const_iterator use_iterator;
use_iterator use_begin() const { return Uses.begin(); }
use_iterator use_end() const { return Uses.end(); }
More information about the llvm-commits
mailing list