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/IceCfgNode.cpp

Issue 490333003: Subzero: Fix address mode optimization involving phi temporaries. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Clean up and better document the test Created 6 years, 3 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 | « no previous file | src/IceDefs.h » ('j') | src/IceTargetLoweringX8632.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) implementation -----===// 1 //===- subzero/src/IceCfgNode.cpp - Basic block (node) 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 CfgNode class, including the complexities 10 // This file implements the CfgNode class, including the complexities
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 InstAssign *NewInst = InstAssign::create(Func, Dest, Operand); 160 InstAssign *NewInst = InstAssign::create(Func, Dest, Operand);
161 // If Src is a variable, set the Src and Dest variables to 161 // If Src is a variable, set the Src and Dest variables to
162 // prefer each other for register allocation. 162 // prefer each other for register allocation.
163 if (Variable *Src = llvm::dyn_cast<Variable>(Operand)) { 163 if (Variable *Src = llvm::dyn_cast<Variable>(Operand)) {
164 bool AllowOverlap = false; 164 bool AllowOverlap = false;
165 Dest->setPreferredRegister(Src, AllowOverlap); 165 Dest->setPreferredRegister(Src, AllowOverlap);
166 Src->setPreferredRegister(Dest, AllowOverlap); 166 Src->setPreferredRegister(Dest, AllowOverlap);
167 } 167 }
168 Insts.insert(InsertionPoint, NewInst); 168 Insts.insert(InsertionPoint, NewInst);
169 NewInst->updateVars(this); 169 NewInst->updateVars(this);
170 Dest->resetDefinition();
jvoung (off chromium) 2014/08/27 16:21:07 This is a way to indicate that the Dest variable i
Jim Stichnoth 2014/08/27 20:23:14 It's more about indicating Dest is multi-def, to p
170 } 171 }
171 } 172 }
172 } 173 }
173 174
174 // Deletes the phi instructions after the loads and stores are placed. 175 // Deletes the phi instructions after the loads and stores are placed.
175 void CfgNode::deletePhis() { 176 void CfgNode::deletePhis() {
176 for (PhiList::iterator I = Phis.begin(), E = Phis.end(); I != E; ++I) { 177 for (PhiList::iterator I = Phis.begin(), E = Phis.end(); I != E; ++I) {
177 (*I)->setDeleted(); 178 (*I)->setDeleted();
178 } 179 }
179 } 180 }
(...skipping 323 matching lines...) Expand 10 before | Expand all | Expand 10 after
503 I != E; ++I) { 504 I != E; ++I) {
504 if (I != OutEdges.begin()) 505 if (I != OutEdges.begin())
505 Str << ", "; 506 Str << ", ";
506 Str << "%" << (*I)->getName(); 507 Str << "%" << (*I)->getName();
507 } 508 }
508 Str << "\n"; 509 Str << "\n";
509 } 510 }
510 } 511 }
511 512
512 } // end of namespace Ice 513 } // end of namespace Ice
OLDNEW
« no previous file with comments | « no previous file | src/IceDefs.h » ('j') | src/IceTargetLoweringX8632.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698