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

Side by Side Diff: src/IceInst.h

Issue 1997443002: Subzero: Initial implementation of BB Local CSE (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Final touches Created 4 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/IceClFlags.def ('k') | src/IceOperand.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.h - High-level instructions ----------*- C++ -*-===// 1 //===- subzero/src/IceInst.h - High-level instructions ----------*- 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
101 bool isDestRedefined() const { return IsDestRedefined; } 101 bool isDestRedefined() const { return IsDestRedefined; }
102 void setDestRedefined() { IsDestRedefined = true; } 102 void setDestRedefined() { IsDestRedefined = true; }
103 103
104 Variable *getDest() const { return Dest; } 104 Variable *getDest() const { return Dest; }
105 105
106 SizeT getSrcSize() const { return NumSrcs; } 106 SizeT getSrcSize() const { return NumSrcs; }
107 Operand *getSrc(SizeT I) const { 107 Operand *getSrc(SizeT I) const {
108 assert(I < getSrcSize()); 108 assert(I < getSrcSize());
109 return Srcs[I]; 109 return Srcs[I];
110 } 110 }
111 void replaceSource(SizeT Index, Operand *Replacement) {
112 assert(Index < NumSrcs);
113 assert(!isDeleted());
114 assert(LiveRangesEnded == 0);
115 //Invalidates liveness info because the use Srcs[Index] is removed.
116 Srcs[Index] = Replacement;
117 }
111 118
112 bool isLastUse(const Operand *Src) const; 119 bool isLastUse(const Operand *Src) const;
113 void spliceLivenessInfo(Inst *OrigInst, Inst *SpliceAssn); 120 void spliceLivenessInfo(Inst *OrigInst, Inst *SpliceAssn);
114 121
115 /// Returns a list of out-edges corresponding to a terminator instruction, 122 /// Returns a list of out-edges corresponding to a terminator instruction,
116 /// which is the last instruction of the block. The list must not contain 123 /// which is the last instruction of the block. The list must not contain
117 /// duplicates. 124 /// duplicates.
118 virtual NodeList getTerminatorEdges() const { 125 virtual NodeList getTerminatorEdges() const {
119 // All valid terminator instructions override this method. For the default 126 // All valid terminator instructions override this method. For the default
120 // implementation, we assert in case some CfgNode is constructed without a 127 // implementation, we assert in case some CfgNode is constructed without a
(...skipping 1022 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 1150
1144 inline Inst *iteratorToInst(InstList::iterator Iter) { return &*Iter; } 1151 inline Inst *iteratorToInst(InstList::iterator Iter) { return &*Iter; }
1145 1152
1146 inline const Inst *iteratorToInst(InstList::const_iterator Iter) { 1153 inline const Inst *iteratorToInst(InstList::const_iterator Iter) {
1147 return &*Iter; 1154 return &*Iter;
1148 } 1155 }
1149 1156
1150 } // end of namespace Ice 1157 } // end of namespace Ice
1151 1158
1152 #endif // SUBZERO_SRC_ICEINST_H 1159 #endif // SUBZERO_SRC_ICEINST_H
OLDNEW
« no previous file with comments | « src/IceClFlags.def ('k') | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698