| OLD | NEW |
| 1 //===- subzero/src/IceRegAlloc.cpp - Linear-scan implementation -----------===// | 1 //===- subzero/src/IceRegAlloc.cpp - Linear-scan 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 LinearScan class, which performs the | 10 // This file implements the LinearScan class, which performs the |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 IsSingleDef && IsAssign && !overlapsDefs(Func, Cur, SrcVar); | 429 IsSingleDef && IsAssign && !overlapsDefs(Func, Cur, SrcVar); |
| 430 } | 430 } |
| 431 if (AllowOverlap || Free[SrcReg]) { | 431 if (AllowOverlap || Free[SrcReg]) { |
| 432 Prefer = SrcVar; | 432 Prefer = SrcVar; |
| 433 PreferReg = SrcReg; | 433 PreferReg = SrcReg; |
| 434 } | 434 } |
| 435 } | 435 } |
| 436 } | 436 } |
| 437 } | 437 } |
| 438 if (Verbose && Prefer) { | 438 if (Verbose && Prefer) { |
| 439 Str << "Initial Prefer=" << *Prefer << " R=" << PreferReg | 439 Str << "Initial Prefer="; |
| 440 << " LIVE=" << Prefer->getLiveRange() | 440 Prefer->dump(Func); |
| 441 Str << " R=" << PreferReg << " LIVE=" << Prefer->getLiveRange() |
| 441 << " Overlap=" << AllowOverlap << "\n"; | 442 << " Overlap=" << AllowOverlap << "\n"; |
| 442 } | 443 } |
| 443 } | 444 } |
| 444 } | 445 } |
| 445 | 446 |
| 446 // Remove registers from the Free[] list where an Inactive range | 447 // Remove registers from the Free[] list where an Inactive range |
| 447 // overlaps with the current range. | 448 // overlaps with the current range. |
| 448 for (const Variable *Item : Inactive) { | 449 for (const Variable *Item : Inactive) { |
| 449 if (Item->rangeOverlaps(Cur)) { | 450 if (Item->rangeOverlaps(Cur)) { |
| 450 int32_t RegNum = Item->getRegNumTmp(); | 451 int32_t RegNum = Item->getRegNumTmp(); |
| (...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 Str << "\n"; | 719 Str << "\n"; |
| 719 } | 720 } |
| 720 Str << "++++++ Inactive:\n"; | 721 Str << "++++++ Inactive:\n"; |
| 721 for (const Variable *Item : Inactive) { | 722 for (const Variable *Item : Inactive) { |
| 722 dumpLiveRange(Item, Func); | 723 dumpLiveRange(Item, Func); |
| 723 Str << "\n"; | 724 Str << "\n"; |
| 724 } | 725 } |
| 725 } | 726 } |
| 726 | 727 |
| 727 } // end of namespace Ice | 728 } // end of namespace Ice |
| OLD | NEW |