| 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 |
| (...skipping 442 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 453 Str << Name; | 453 Str << Name; |
| 454 else | 454 else |
| 455 Str << Ctx->mangleName(Name); | 455 Str << Ctx->mangleName(Name); |
| 456 if (Offset) { | 456 if (Offset) { |
| 457 if (Offset > 0) | 457 if (Offset > 0) |
| 458 Str << "+"; | 458 Str << "+"; |
| 459 Str << Offset; | 459 Str << Offset; |
| 460 } | 460 } |
| 461 } | 461 } |
| 462 | 462 |
| 463 void ConstantRelocatable::dump(const Cfg *, Ostream &Str) const { | 463 void ConstantRelocatable::dump(const Cfg *Func, Ostream &Str) const { |
| 464 Str << "@" << Name; | 464 Str << "@"; |
| 465 if (Func && !SuppressMangling) { |
| 466 Str << Func->getContext()->mangleName(Name); |
| 467 } else { |
| 468 Str << Name; |
| 469 } |
| 465 if (Offset) | 470 if (Offset) |
| 466 Str << "+" << Offset; | 471 Str << "+" << Offset; |
| 467 } | 472 } |
| 468 | 473 |
| 469 void LiveRange::dump(Ostream &Str) const { | 474 void LiveRange::dump(Ostream &Str) const { |
| 470 Str << "(weight=" << Weight << ") "; | 475 Str << "(weight=" << Weight << ") "; |
| 471 bool First = true; | 476 bool First = true; |
| 472 for (const RangeElementType &I : Range) { | 477 for (const RangeElementType &I : Range) { |
| 473 if (!First) | 478 if (!First) |
| 474 Str << ", "; | 479 Str << ", "; |
| 475 First = false; | 480 First = false; |
| 476 Str << "[" << I.first << ":" << I.second << ")"; | 481 Str << "[" << I.first << ":" << I.second << ")"; |
| 477 } | 482 } |
| 478 } | 483 } |
| 479 | 484 |
| 480 Ostream &operator<<(Ostream &Str, const LiveRange &L) { | 485 Ostream &operator<<(Ostream &Str, const LiveRange &L) { |
| 481 L.dump(Str); | 486 L.dump(Str); |
| 482 return Str; | 487 return Str; |
| 483 } | 488 } |
| 484 | 489 |
| 485 Ostream &operator<<(Ostream &Str, const RegWeight &W) { | 490 Ostream &operator<<(Ostream &Str, const RegWeight &W) { |
| 486 if (W.getWeight() == RegWeight::Inf) | 491 if (W.getWeight() == RegWeight::Inf) |
| 487 Str << "Inf"; | 492 Str << "Inf"; |
| 488 else | 493 else |
| 489 Str << W.getWeight(); | 494 Str << W.getWeight(); |
| 490 return Str; | 495 return Str; |
| 491 } | 496 } |
| 492 | 497 |
| 493 } // end of namespace Ice | 498 } // end of namespace Ice |
| OLD | NEW |