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

Side by Side Diff: src/IceInst.cpp

Issue 1838753002: Subzero: Remove IceString. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 4 years, 8 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 | « src/IceInst.h ('k') | src/IceInstARM32.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/IceInst.cpp - High-level instruction implementation ----===// 1 //===- subzero/src/IceInst.cpp - High-level instruction 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 /// \file 10 /// \file
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 ICEINSTICMP_TABLE 70 ICEINSTICMP_TABLE
71 #undef X 71 #undef X
72 }; 72 };
73 73
74 } // end of anonymous namespace 74 } // end of anonymous namespace
75 75
76 Inst::Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest) 76 Inst::Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest)
77 : Kind(Kind), Number(Func->newInstNumber()), Dest(Dest), MaxSrcs(MaxSrcs), 77 : Kind(Kind), Number(Func->newInstNumber()), Dest(Dest), MaxSrcs(MaxSrcs),
78 Srcs(Func->allocateArrayOf<Operand *>(MaxSrcs)), LiveRangesEnded(0) {} 78 Srcs(Func->allocateArrayOf<Operand *>(MaxSrcs)), LiveRangesEnded(0) {}
79 79
80 IceString Inst::getInstName() const { 80 const char *Inst::getInstName() const {
81 if (!BuildDefs::dump()) 81 if (!BuildDefs::dump())
82 return "???"; 82 return "???";
83 83
84 switch (Kind) { 84 switch (Kind) {
85 #define X(InstrKind, name) \ 85 #define X(InstrKind, name) \
86 case InstrKind: \ 86 case InstrKind: \
87 return name 87 return name
88 X(Unreachable, "unreachable"); 88 X(Unreachable, "unreachable");
89 X(Alloca, "alloca"); 89 X(Alloca, "alloca");
90 X(Arithmetic, "arithmetic"); 90 X(Arithmetic, "arithmetic");
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 addSource(ByteCount); 265 addSource(ByteCount);
266 } 266 }
267 267
268 InstArithmetic::InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest, 268 InstArithmetic::InstArithmetic(Cfg *Func, OpKind Op, Variable *Dest,
269 Operand *Source1, Operand *Source2) 269 Operand *Source1, Operand *Source2)
270 : InstHighLevel(Func, Inst::Arithmetic, 2, Dest), Op(Op) { 270 : InstHighLevel(Func, Inst::Arithmetic, 2, Dest), Op(Op) {
271 addSource(Source1); 271 addSource(Source1);
272 addSource(Source2); 272 addSource(Source2);
273 } 273 }
274 274
275 IceString InstArithmetic::getInstName() const { 275 const char *InstArithmetic::getInstName() const {
276 if (!BuildDefs::dump()) 276 if (!BuildDefs::dump())
277 return "???"; 277 return "???";
278 278
279 return InstArithmeticAttributes[getOp()].DisplayString; 279 return InstArithmeticAttributes[getOp()].DisplayString;
280 } 280 }
281 281
282 const char *InstArithmetic::getOpName(OpKind Op) { 282 const char *InstArithmetic::getOpName(OpKind Op) {
283 return Op < InstArithmetic::_num ? InstArithmeticAttributes[Op].DisplayString 283 return Op < InstArithmetic::_num ? InstArithmeticAttributes[Op].DisplayString
284 : "???"; 284 : "???";
285 } 285 }
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
1011 // upper 32 bits of rax. We need to recognize and preserve these. 1011 // upper 32 bits of rax. We need to recognize and preserve these.
1012 return true; 1012 return true;
1013 } 1013 }
1014 if (!Dest->hasReg() && !SrcVar->hasReg() && 1014 if (!Dest->hasReg() && !SrcVar->hasReg() &&
1015 Dest->getStackOffset() == SrcVar->getStackOffset()) 1015 Dest->getStackOffset() == SrcVar->getStackOffset())
1016 return true; 1016 return true;
1017 return false; 1017 return false;
1018 } 1018 }
1019 1019
1020 } // end of namespace Ice 1020 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.h ('k') | src/IceInstARM32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698