mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-09-01 04:29:57 +00:00
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
This commit is contained in:
parent
3c987aead2
commit
93c1fd49d2
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user