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

Side by Side Diff: src/IceInst.cpp

Issue 1197223002: Subzero: Use C++11 member initializers where practical. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 6 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/IceIntrinsics.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/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 // This file implements the Inst class, primarily the various 10 // This file implements the Inst class, primarily the various
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #define X(tag, str) \ 63 #define X(tag, str) \
64 { str } \ 64 { str } \
65 , 65 ,
66 ICEINSTICMP_TABLE 66 ICEINSTICMP_TABLE
67 #undef X 67 #undef X
68 }; 68 };
69 69
70 } // end of anonymous namespace 70 } // end of anonymous namespace
71 71
72 Inst::Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest) 72 Inst::Inst(Cfg *Func, InstKind Kind, SizeT MaxSrcs, Variable *Dest)
73 : Kind(Kind), Number(Func->newInstNumber()), Deleted(false), Dead(false), 73 : Kind(Kind), Number(Func->newInstNumber()), Dest(Dest), MaxSrcs(MaxSrcs),
74 HasSideEffects(false), IsDestNonKillable(false), Dest(Dest),
75 MaxSrcs(MaxSrcs), NumSrcs(0),
76 Srcs(Func->allocateArrayOf<Operand *>(MaxSrcs)), LiveRangesEnded(0) {} 74 Srcs(Func->allocateArrayOf<Operand *>(MaxSrcs)), LiveRangesEnded(0) {}
77 75
78 // Assign the instruction a new number. 76 // Assign the instruction a new number.
79 void Inst::renumber(Cfg *Func) { 77 void Inst::renumber(Cfg *Func) {
80 Number = isDeleted() ? NumberDeleted : Func->newInstNumber(); 78 Number = isDeleted() ? NumberDeleted : Func->newInstNumber();
81 } 79 }
82 80
83 // Delete the instruction if its tentative Dead flag is still set 81 // Delete the instruction if its tentative Dead flag is still set
84 // after liveness analysis. 82 // after liveness analysis.
85 void Inst::deleteIfDead() { 83 void Inst::deleteIfDead() {
(...skipping 849 matching lines...) Expand 10 before | Expand all | Expand 10 after
935 // preserve these. 933 // preserve these.
936 return true; 934 return true;
937 } 935 }
938 if (!Dest->hasReg() && !SrcVar->hasReg() && 936 if (!Dest->hasReg() && !SrcVar->hasReg() &&
939 Dest->getStackOffset() == SrcVar->getStackOffset()) 937 Dest->getStackOffset() == SrcVar->getStackOffset())
940 return true; 938 return true;
941 return false; 939 return false;
942 } 940 }
943 941
944 } // end of namespace Ice 942 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.h ('k') | src/IceIntrinsics.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698