Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(107)

Side by Side Diff: src/IceOperand.h

Issue 1614273002: Subzero: Make -reg-use and -reg-exclude specific to register class. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Add error log Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/IceRegAlloc.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | src/IceRegAlloc.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698