| OLD | NEW |
| 1 //===- subzero/src/IceRegAlloc.h - Linear-scan reg. allocation --*- C++ -*-===// | 1 //===- subzero/src/IceRegAlloc.h - Linear-scan reg. allocation --*- C++ -*-===// |
| 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 declares the LinearScan data structure used during | 10 // This file declares the LinearScan data structure used during |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 namespace Ice { | 22 namespace Ice { |
| 23 | 23 |
| 24 class LinearScan { | 24 class LinearScan { |
| 25 LinearScan(const LinearScan &) = delete; | 25 LinearScan(const LinearScan &) = delete; |
| 26 LinearScan &operator=(const LinearScan &) = delete; | 26 LinearScan &operator=(const LinearScan &) = delete; |
| 27 | 27 |
| 28 public: | 28 public: |
| 29 LinearScan(Cfg *Func) | 29 LinearScan(Cfg *Func) |
| 30 : Func(Func), FindPreference(false), FindOverlap(false) {} | 30 : Func(Func), FindPreference(false), FindOverlap(false) {} |
| 31 void init(RegAllocKind Kind); | 31 void init(RegAllocKind Kind); |
| 32 void scan(const llvm::SmallBitVector &RegMask); | 32 void scan(const llvm::SmallBitVector &RegMask, bool Randomized); |
| 33 void dump(Cfg *Func) const; | 33 void dump(Cfg *Func) const; |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 typedef std::vector<Variable *> OrderedRanges; | 36 typedef std::vector<Variable *> OrderedRanges; |
| 37 typedef std::vector<Variable *> UnorderedRanges; | 37 typedef std::vector<Variable *> UnorderedRanges; |
| 38 | 38 |
| 39 void initForGlobal(); | 39 void initForGlobal(); |
| 40 void initForInfOnly(); | 40 void initForInfOnly(); |
| 41 // Move an item from the From set to the To set. From[Index] is | 41 // Move an item from the From set to the To set. From[Index] is |
| 42 // pushed onto the end of To[], then the item is efficiently removed | 42 // pushed onto the end of To[], then the item is efficiently removed |
| (...skipping 18 matching lines...) Expand all Loading... |
| 61 bool FindOverlap; | 61 bool FindOverlap; |
| 62 // TODO(stichnot): We're not really using FindOverlap yet, but we | 62 // TODO(stichnot): We're not really using FindOverlap yet, but we |
| 63 // may want a flavor of register allocation where FindPreference is | 63 // may want a flavor of register allocation where FindPreference is |
| 64 // useful but we didn't want to initialize VMetadata with VMK_All | 64 // useful but we didn't want to initialize VMetadata with VMK_All |
| 65 // and therefore we can't safely allow overlap. | 65 // and therefore we can't safely allow overlap. |
| 66 }; | 66 }; |
| 67 | 67 |
| 68 } // end of namespace Ice | 68 } // end of namespace Ice |
| 69 | 69 |
| 70 #endif // SUBZERO_SRC_ICEREGALLOC_H | 70 #endif // SUBZERO_SRC_ICEREGALLOC_H |
| OLD | NEW |