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

Side by Side Diff: src/IceRegAlloc.cpp

Issue 1273823003: Subzero: Completely remove tracking of stack pointer live range. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix a condition to match previous logic. Created 5 years, 4 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/IceOperand.h ('k') | no next file » | 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/IceRegAlloc.cpp - Linear-scan implementation -----------===// 1 //===- subzero/src/IceRegAlloc.cpp - Linear-scan 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 // Iterate across all instructions and record the begin and end of 171 // Iterate across all instructions and record the begin and end of
172 // the live range for each variable that is pre-colored or infinite 172 // the live range for each variable that is pre-colored or infinite
173 // weight. 173 // weight.
174 std::vector<InstNumberT> LRBegin(Vars.size(), Inst::NumberSentinel); 174 std::vector<InstNumberT> LRBegin(Vars.size(), Inst::NumberSentinel);
175 std::vector<InstNumberT> LREnd(Vars.size(), Inst::NumberSentinel); 175 std::vector<InstNumberT> LREnd(Vars.size(), Inst::NumberSentinel);
176 for (CfgNode *Node : Func->getNodes()) { 176 for (CfgNode *Node : Func->getNodes()) {
177 for (Inst &Inst : Node->getInsts()) { 177 for (Inst &Inst : Node->getInsts()) {
178 if (Inst.isDeleted()) 178 if (Inst.isDeleted())
179 continue; 179 continue;
180 if (const Variable *Var = Inst.getDest()) { 180 if (const Variable *Var = Inst.getDest()) {
181 if (Var->hasReg() || Var->getWeight().isInf()) { 181 if (!Var->getIgnoreLiveness() &&
182 (Var->hasReg() || Var->getWeight().isInf())) {
182 if (LRBegin[Var->getIndex()] == Inst::NumberSentinel) { 183 if (LRBegin[Var->getIndex()] == Inst::NumberSentinel) {
183 LRBegin[Var->getIndex()] = Inst.getNumber(); 184 LRBegin[Var->getIndex()] = Inst.getNumber();
184 ++NumVars; 185 ++NumVars;
185 } 186 }
186 } 187 }
187 } 188 }
188 for (SizeT I = 0; I < Inst.getSrcSize(); ++I) { 189 for (SizeT I = 0; I < Inst.getSrcSize(); ++I) {
189 Operand *Src = Inst.getSrc(I); 190 Operand *Src = Inst.getSrc(I);
190 SizeT NumVars = Src->getNumVars(); 191 SizeT NumVars = Src->getNumVars();
191 for (SizeT J = 0; J < NumVars; ++J) { 192 for (SizeT J = 0; J < NumVars; ++J) {
192 const Variable *Var = Src->getVar(J); 193 const Variable *Var = Src->getVar(J);
194 if (Var->getIgnoreLiveness())
195 continue;
193 if (Var->hasReg() || Var->getWeight().isInf()) 196 if (Var->hasReg() || Var->getWeight().isInf())
194 LREnd[Var->getIndex()] = Inst.getNumber(); 197 LREnd[Var->getIndex()] = Inst.getNumber();
195 } 198 }
196 } 199 }
197 } 200 }
198 } 201 }
199 202
200 Unhandled.reserve(NumVars); 203 Unhandled.reserve(NumVars);
201 UnhandledPrecolored.reserve(NumVars); 204 UnhandledPrecolored.reserve(NumVars);
202 for (SizeT i = 0; i < Vars.size(); ++i) { 205 for (SizeT i = 0; i < Vars.size(); ++i) {
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 Str << "\n"; 850 Str << "\n";
848 } 851 }
849 Str << "++++++ Inactive:\n"; 852 Str << "++++++ Inactive:\n";
850 for (const Variable *Item : Inactive) { 853 for (const Variable *Item : Inactive) {
851 dumpLiveRange(Item, Func); 854 dumpLiveRange(Item, Func);
852 Str << "\n"; 855 Str << "\n";
853 } 856 }
854 } 857 }
855 858
856 } // end of namespace Ice 859 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceOperand.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698