| 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 if (A.Offset != B.Offset || A.SuppressMangling != B.SuppressMangling) |
| 25 return A.Offset < B.Offset; | 25 return false; |
| 26 if (A.SuppressMangling != B.SuppressMangling) | 26 return A.Name == B.Name; |
| 27 return A.SuppressMangling < B.SuppressMangling; | |
| 28 return A.Name < B.Name; | |
| 29 } | 27 } |
| 30 | 28 |
| 31 bool operator<(const RegWeight &A, const RegWeight &B) { | 29 bool operator<(const RegWeight &A, const RegWeight &B) { |
| 32 return A.getWeight() < B.getWeight(); | 30 return A.getWeight() < B.getWeight(); |
| 33 } | 31 } |
| 34 bool operator<=(const RegWeight &A, const RegWeight &B) { return !(B < A); } | 32 bool operator<=(const RegWeight &A, const RegWeight &B) { return !(B < A); } |
| 35 bool operator==(const RegWeight &A, const RegWeight &B) { | 33 bool operator==(const RegWeight &A, const RegWeight &B) { |
| 36 return !(B < A) && !(A < B); | 34 return !(B < A) && !(A < B); |
| 37 } | 35 } |
| 38 | 36 |
| (...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 520 if (!ALLOW_DUMP) | 518 if (!ALLOW_DUMP) |
| 521 return Str; | 519 return Str; |
| 522 if (W.getWeight() == RegWeight::Inf) | 520 if (W.getWeight() == RegWeight::Inf) |
| 523 Str << "Inf"; | 521 Str << "Inf"; |
| 524 else | 522 else |
| 525 Str << W.getWeight(); | 523 Str << W.getWeight(); |
| 526 return Str; | 524 return Str; |
| 527 } | 525 } |
| 528 | 526 |
| 529 } // end of namespace Ice | 527 } // end of namespace Ice |
| OLD | NEW |