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

Side by Side Diff: src/IceInst.cpp

Issue 1368993004: Subzero: Improve usability of liveness-related tools. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Code review changes Created 5 years, 2 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/IceRegAlloc.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 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
163 163
164 bool Inst::liveness(InstNumberT InstNumber, LivenessBV &Live, 164 bool Inst::liveness(InstNumberT InstNumber, LivenessBV &Live,
165 Liveness *Liveness, LiveBeginEndMap *LiveBegin, 165 Liveness *Liveness, LiveBeginEndMap *LiveBegin,
166 LiveBeginEndMap *LiveEnd) { 166 LiveBeginEndMap *LiveEnd) {
167 assert(!isDeleted()); 167 assert(!isDeleted());
168 168
169 Dead = false; 169 Dead = false;
170 if (Dest) { 170 if (Dest) {
171 SizeT VarNum = Liveness->getLiveIndex(Dest->getIndex()); 171 SizeT VarNum = Liveness->getLiveIndex(Dest->getIndex());
172 if (Live[VarNum]) { 172 if (Live[VarNum]) {
173 if (!isDestNonKillable()) { 173 if (!isDestRedefined()) {
174 Live[VarNum] = false; 174 Live[VarNum] = false;
175 if (LiveBegin && Liveness->getRangeMask(Dest->getIndex())) { 175 if (LiveBegin && Liveness->getRangeMask(Dest->getIndex())) {
176 LiveBegin->push_back(std::make_pair(VarNum, InstNumber)); 176 LiveBegin->push_back(std::make_pair(VarNum, InstNumber));
177 } 177 }
178 } 178 }
179 } else { 179 } else {
180 if (!hasSideEffects()) 180 if (!hasSideEffects())
181 Dead = true; 181 Dead = true;
182 } 182 }
183 } 183 }
(...skipping 769 matching lines...) Expand 10 before | Expand all | Expand 10 after
953 // upper 32 bits of rax. We need to recognize and preserve these. 953 // upper 32 bits of rax. We need to recognize and preserve these.
954 return true; 954 return true;
955 } 955 }
956 if (!Dest->hasReg() && !SrcVar->hasReg() && 956 if (!Dest->hasReg() && !SrcVar->hasReg() &&
957 Dest->getStackOffset() == SrcVar->getStackOffset()) 957 Dest->getStackOffset() == SrcVar->getStackOffset())
958 return true; 958 return true;
959 return false; 959 return false;
960 } 960 }
961 961
962 } // end of namespace Ice 962 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceInst.h ('k') | src/IceRegAlloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698