diff options
author | Justin Holewinski <jholewinski@nvidia.com> | 2013-03-20 23:10:59 +0000 |
---|---|---|
committer | Justin Holewinski <jholewinski@nvidia.com> | 2013-03-20 23:10:59 +0000 |
commit | 93c1fd49d2ca49447e092c4c1c4d5de1005e9e71 (patch) | |
tree | 5fde021d29ac7c6a33a335ea82ccf5bd023d60db | |
parent | 3c987aead275e5e4c654650fd7199c4acf1d18cf (diff) |
Make variable name more explicit and eliminate redundant lookup in SDNodeOrdering
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177600 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/CodeGen/SelectionDAG/SDNodeOrdering.h | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SDNodeOrdering.h b/lib/CodeGen/SelectionDAG/SDNodeOrdering.h index 74010a8096..7e7b8974be 100644 --- a/lib/CodeGen/SelectionDAG/SDNodeOrdering.h +++ b/lib/CodeGen/SelectionDAG/SDNodeOrdering.h @@ -33,10 +33,10 @@ class SDNodeOrdering { public: SDNodeOrdering() {} - void add(const SDNode *Node, unsigned O) { - unsigned OldOrder = getOrder(Node); - if (OldOrder == 0 || (OldOrder > 0 && O < OldOrder)) - OrderMap[Node] = O; + void add(const SDNode *Node, unsigned NewOrder) { + unsigned &OldOrder = OrderMap[Node]; + if (OldOrder == 0 || (OldOrder > 0 && NewOrder < OldOrder)) + OldOrder = NewOrder; } void remove(const SDNode *Node) { DenseMap<const SDNode*, unsigned>::iterator Itr = OrderMap.find(Node); |