aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/SelectionDAG
diff options
context:
space:
mode:
authorJustin Holewinski <jholewinski@nvidia.com>2013-03-20 23:10:59 +0000
committerJustin Holewinski <jholewinski@nvidia.com>2013-03-20 23:10:59 +0000
commit93c1fd49d2ca49447e092c4c1c4d5de1005e9e71 (patch)
tree5fde021d29ac7c6a33a335ea82ccf5bd023d60db /lib/CodeGen/SelectionDAG
parent3c987aead275e5e4c654650fd7199c4acf1d18cf (diff)
downloadexternal_llvm-93c1fd49d2ca49447e092c4c1c4d5de1005e9e71.zip
external_llvm-93c1fd49d2ca49447e092c4c1c4d5de1005e9e71.tar.gz
external_llvm-93c1fd49d2ca49447e092c4c1c4d5de1005e9e71.tar.bz2
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
Diffstat (limited to 'lib/CodeGen/SelectionDAG')
-rw-r--r--lib/CodeGen/SelectionDAG/SDNodeOrdering.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/CodeGen/SelectionDAG/SDNodeOrdering.h b/lib/CodeGen/SelectionDAG/SDNodeOrdering.h
index 74010a8..7e7b897 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);