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

Side by Side Diff: src/IceOperand.cpp

Issue 737513008: Subzero: Simplify the constant pools. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Better fix for the int8/uint8 tests Created 6 years, 1 month 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 | « src/IceOperand.h ('k') | src/IceTargetLoweringX8632.h » ('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.cpp - High-level operand implementation -----===// 1 //===- subzero/src/IceOperand.cpp - High-level operand implementation -----===//
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 implements the Operand class and its target-independent 10 // This file implements the Operand class and its target-independent
11 // subclasses, primarily for the methods of the Variable class. 11 // subclasses, primarily for the methods of the Variable class.
12 // 12 //
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #include "IceCfg.h" 15 #include "IceCfg.h"
16 #include "IceCfgNode.h" 16 #include "IceCfgNode.h"
17 #include "IceInst.h" 17 #include "IceInst.h"
18 #include "IceOperand.h" 18 #include "IceOperand.h"
19 #include "IceTargetLowering.h" // dumping stack/frame pointer register 19 #include "IceTargetLowering.h" // dumping stack/frame pointer register
20 20
21 namespace Ice { 21 namespace Ice {
22 22
23 bool operator<(const RelocatableTuple &A, const RelocatableTuple &B) { 23 bool operator==(const RelocatableTuple &A, const RelocatableTuple &B) {
24 if (A.Offset != B.Offset) 24 return A.Offset == B.Offset && A.Name == B.Name;
25 return A.Offset < B.Offset;
26 if (A.SuppressMangling != B.SuppressMangling)
27 return A.SuppressMangling < B.SuppressMangling;
28 return A.Name < B.Name;
29 } 25 }
30 26
31 bool operator<(const RegWeight &A, const RegWeight &B) { 27 bool operator<(const RegWeight &A, const RegWeight &B) {
32 return A.getWeight() < B.getWeight(); 28 return A.getWeight() < B.getWeight();
33 } 29 }
34 bool operator<=(const RegWeight &A, const RegWeight &B) { return !(B < A); } 30 bool operator<=(const RegWeight &A, const RegWeight &B) { return !(B < A); }
35 bool operator==(const RegWeight &A, const RegWeight &B) { 31 bool operator==(const RegWeight &A, const RegWeight &B) {
36 return !(B < A) && !(A < B); 32 return !(B < A) && !(A < B);
37 } 33 }
38 34
(...skipping 481 matching lines...) Expand 10 before | Expand all | Expand 10 after
520 if (!ALLOW_DUMP) 516 if (!ALLOW_DUMP)
521 return Str; 517 return Str;
522 if (W.getWeight() == RegWeight::Inf) 518 if (W.getWeight() == RegWeight::Inf)
523 Str << "Inf"; 519 Str << "Inf";
524 else 520 else
525 Str << W.getWeight(); 521 Str << W.getWeight();
526 return Str; 522 return Str;
527 } 523 }
528 524
529 } // end of namespace Ice 525 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceOperand.h ('k') | src/IceTargetLoweringX8632.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698