OLD | NEW |
1 //===- subzero/src/IceOperand.h - High-level operands -----------*- C++ -*-===// | 1 //===- subzero/src/IceOperand.h - High-level operands -----------*- 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 406 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 /// monotonically according to live range start, we can optimize overlaps() by | 417 /// monotonically according to live range start, we can optimize overlaps() by |
418 /// ignoring all segments that end before the start of Cur's range. The | 418 /// ignoring all segments that end before the start of Cur's range. The |
419 /// linear-scan code enables this by calling trim() on the ranges of interest | 419 /// linear-scan code enables this by calling trim() on the ranges of interest |
420 /// as Cur advances. Note that linear-scan also has to initialize TrimmedBegin | 420 /// as Cur advances. Note that linear-scan also has to initialize TrimmedBegin |
421 /// at the beginning by calling untrim(). | 421 /// at the beginning by calling untrim(). |
422 RangeType::const_iterator TrimmedBegin; | 422 RangeType::const_iterator TrimmedBegin; |
423 }; | 423 }; |
424 | 424 |
425 Ostream &operator<<(Ostream &Str, const LiveRange &L); | 425 Ostream &operator<<(Ostream &Str, const LiveRange &L); |
426 | 426 |
427 /// RegClass indicates the physical register class that a Variable may be | |
428 /// register-allocated from. By default, a variable's register class is | |
429 /// directly associated with its type. However, the target lowering may define | |
430 /// additional target-specific register classes by extending the set of enum | |
431 /// values. | |
432 enum RegClass : uint8_t { | |
433 // Define RC_void, RC_i1, RC_i8, etc. | |
434 #define X(tag, sizeLog2, align, elts, elty, str) RC_##tag = IceType_##tag, | |
435 ICETYPE_TABLE | |
436 #undef X | |
437 RC_Target, | |
438 // Leave plenty of space for target-specific values. | |
439 RC_Max = std::numeric_limits<uint8_t>::max() | |
440 }; | |
441 static_assert(RC_Target == static_cast<RegClass>(IceType_NUM), | |
442 "Expected RC_Target and IceType_NUM to be the same"); | |
443 | |
444 /// Variable represents an operand that is register-allocated or | 427 /// Variable represents an operand that is register-allocated or |
445 /// stack-allocated. If it is register-allocated, it will ultimately have a | 428 /// stack-allocated. If it is register-allocated, it will ultimately have a |
446 /// non-negative RegNum field. | 429 /// non-negative RegNum field. |
447 class Variable : public Operand { | 430 class Variable : public Operand { |
448 Variable() = delete; | 431 Variable() = delete; |
449 Variable(const Variable &) = delete; | 432 Variable(const Variable &) = delete; |
450 Variable &operator=(const Variable &) = delete; | 433 Variable &operator=(const Variable &) = delete; |
451 | 434 |
452 enum RegRequirement : uint8_t { | 435 enum RegRequirement : uint8_t { |
453 RR_MayHaveRegister, | 436 RR_MayHaveRegister, |
(...skipping 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
763 private: | 746 private: |
764 const Cfg *Func; | 747 const Cfg *Func; |
765 MetadataKind Kind; | 748 MetadataKind Kind; |
766 CfgVector<VariableTracking> Metadata; | 749 CfgVector<VariableTracking> Metadata; |
767 const static InstDefList NoDefinitions; | 750 const static InstDefList NoDefinitions; |
768 }; | 751 }; |
769 | 752 |
770 } // end of namespace Ice | 753 } // end of namespace Ice |
771 | 754 |
772 #endif // SUBZERO_SRC_ICEOPERAND_H | 755 #endif // SUBZERO_SRC_ICEOPERAND_H |
OLD | NEW |