OLD | NEW |
---|---|
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 Loading... | |
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 Loading... | |
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 |
OLD | NEW |