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