OLD | NEW |
---|---|
1 //===- subzero/src/IceOperand.cpp - High-level operand implementation -----===// | 1 //===- subzero/src/IceOperand.cpp - High-level operand implementation -----===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file implements the Operand class and its target-independent | 10 // This file implements the Operand class and its target-independent |
11 // subclasses, primarily for the methods of the Variable class. | 11 // subclasses, primarily for the methods of the Variable class. |
12 // | 12 // |
13 //===----------------------------------------------------------------------===// | 13 //===----------------------------------------------------------------------===// |
14 | 14 |
15 #include "IceCfg.h" | 15 #include "IceCfg.h" |
16 #include "IceCfgNode.h" | 16 #include "IceCfgNode.h" |
17 #include "IceInst.h" | 17 #include "IceInst.h" |
18 #include "IceOperand.h" | 18 #include "IceOperand.h" |
19 #include "IceTargetLowering.h" // dumping stack/frame pointer register | 19 #include "IceTargetLowering.h" // dumping stack/frame pointer register |
20 | 20 |
21 namespace Ice { | 21 namespace Ice { |
22 | 22 |
23 bool operator<(const RelocatableTuple &A, const RelocatableTuple &B) { | 23 bool operator==(const RelocatableTuple &A, const RelocatableTuple &B) { |
24 if (A.Offset != B.Offset) | 24 return A.Offset == B.Offset && A.Name == B.Name; |
jvoung (off chromium)
2014/11/19 20:54:55
This used to check SuppressMangling as well. It do
Jim Stichnoth
2014/11/20 00:08:57
You're right, I'll update the commit message.
We
| |
25 return A.Offset < B.Offset; | |
26 if (A.SuppressMangling != B.SuppressMangling) | |
27 return A.SuppressMangling < B.SuppressMangling; | |
28 return A.Name < B.Name; | |
29 } | 25 } |
30 | 26 |
31 bool operator<(const RegWeight &A, const RegWeight &B) { | 27 bool operator<(const RegWeight &A, const RegWeight &B) { |
32 return A.getWeight() < B.getWeight(); | 28 return A.getWeight() < B.getWeight(); |
33 } | 29 } |
34 bool operator<=(const RegWeight &A, const RegWeight &B) { return !(B < A); } | 30 bool operator<=(const RegWeight &A, const RegWeight &B) { return !(B < A); } |
35 bool operator==(const RegWeight &A, const RegWeight &B) { | 31 bool operator==(const RegWeight &A, const RegWeight &B) { |
36 return !(B < A) && !(A < B); | 32 return !(B < A) && !(A < B); |
37 } | 33 } |
38 | 34 |
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
520 if (!ALLOW_DUMP) | 516 if (!ALLOW_DUMP) |
521 return Str; | 517 return Str; |
522 if (W.getWeight() == RegWeight::Inf) | 518 if (W.getWeight() == RegWeight::Inf) |
523 Str << "Inf"; | 519 Str << "Inf"; |
524 else | 520 else |
525 Str << W.getWeight(); | 521 Str << W.getWeight(); |
526 return Str; | 522 return Str; |
527 } | 523 } |
528 | 524 |
529 } // end of namespace Ice | 525 } // end of namespace Ice |
OLD | NEW |