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

Side by Side Diff: src/IceOperand.h

Issue 1691193002: Subzero: Prototype to make use of RegNumT::No Register more concise (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 4 years, 10 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/IceTargetLoweringMIPS32.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 425 matching lines...) Expand 10 before | Expand all | Expand 10 after
436 // Make sure it's only called once. 436 // Make sure it's only called once.
437 assert(Limit == 0); 437 assert(Limit == 0);
438 assert(Value != 0); 438 assert(Value != 0);
439 Limit = Value; 439 Limit = Value;
440 } 440 }
441 // Define NoRegisterValue as an enum value so that it can be used as an 441 // Define NoRegisterValue as an enum value so that it can be used as an
442 // argument for the public ctor if desired. 442 // argument for the public ctor if desired.
443 enum { NoRegisterValue = std::numeric_limits<BaseType>::max() }; 443 enum { NoRegisterValue = std::numeric_limits<BaseType>::max() };
444 const static RegNumT NoRegister /* = NoRegisterValue */; 444 const static RegNumT NoRegister /* = NoRegisterValue */;
445 445
446 bool noRegister() {return Value == NoRegisterValue;}
Jim Stichnoth 2016/02/12 02:20:15 This seems OK. I might change the name to somethi
rkotlerimgtec 2016/02/12 03:00:16 I've made the change to the predicate. I think it
447
446 private: 448 private:
447 BaseType Value = NoRegisterValue; 449 BaseType Value = NoRegisterValue;
448 static BaseType Limit; 450 static BaseType Limit;
449 /// Private ctor called only by fromInt() and fixme(). 451 /// Private ctor called only by fromInt() and fixme().
450 RegNumT(BaseType Value) : Value(Value) { validate(Value); } 452 RegNumT(BaseType Value) : Value(Value) { validate(Value); }
451 /// The ctor calls this to validate against the target-supplied limit. 453 /// The ctor calls this to validate against the target-supplied limit.
452 static void validate(BaseType Value) { 454 static void validate(BaseType Value) {
453 (void)Value; 455 (void)Value;
454 assert(Value == NoRegisterValue || Value < Limit); 456 assert(Value == NoRegisterValue || Value < Limit);
455 } 457 }
(...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after
923 private: 925 private:
924 const Cfg *Func; 926 const Cfg *Func;
925 MetadataKind Kind; 927 MetadataKind Kind;
926 CfgVector<VariableTracking> Metadata; 928 CfgVector<VariableTracking> Metadata;
927 const static InstDefList NoDefinitions; 929 const static InstDefList NoDefinitions;
928 }; 930 };
929 931
930 } // end of namespace Ice 932 } // end of namespace Ice
931 933
932 #endif // SUBZERO_SRC_ICEOPERAND_H 934 #endif // SUBZERO_SRC_ICEOPERAND_H
OLDNEW
« no previous file with comments | « no previous file | src/IceTargetLoweringMIPS32.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698