| 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 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 509 Target->doNopInsertion(); | 509 Target->doNopInsertion(); |
| 510 } | 510 } |
| 511 | 511 |
| 512 // Drives the target lowering. Passes the current instruction and the | 512 // Drives the target lowering. Passes the current instruction and the |
| 513 // next non-deleted instruction for target lowering. | 513 // next non-deleted instruction for target lowering. |
| 514 void CfgNode::genCode() { | 514 void CfgNode::genCode() { |
| 515 TargetLowering *Target = Func->getTarget(); | 515 TargetLowering *Target = Func->getTarget(); |
| 516 LoweringContext &Context = Target->getContext(); | 516 LoweringContext &Context = Target->getContext(); |
| 517 // Lower the regular instructions. | 517 // Lower the regular instructions. |
| 518 Context.init(this); | 518 Context.init(this); |
| 519 Target->initNodeForLowering(this); |
| 519 while (!Context.atEnd()) { | 520 while (!Context.atEnd()) { |
| 520 InstList::iterator Orig = Context.getCur(); | 521 InstList::iterator Orig = Context.getCur(); |
| 521 if (llvm::isa<InstRet>(*Orig)) | 522 if (llvm::isa<InstRet>(*Orig)) |
| 522 setHasReturn(); | 523 setHasReturn(); |
| 523 Target->lower(); | 524 Target->lower(); |
| 524 // Ensure target lowering actually moved the cursor. | 525 // Ensure target lowering actually moved the cursor. |
| 525 assert(Context.getCur() != Orig); | 526 assert(Context.getCur() != Orig); |
| 526 } | 527 } |
| 527 // Do preliminary lowering of the Phi instructions. | 528 // Do preliminary lowering of the Phi instructions. |
| 528 Target->prelowerPhis(); | 529 Target->prelowerPhis(); |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1202 if (!First) | 1203 if (!First) |
| 1203 Str << ", "; | 1204 Str << ", "; |
| 1204 First = false; | 1205 First = false; |
| 1205 Str << "%" << I->getName(); | 1206 Str << "%" << I->getName(); |
| 1206 } | 1207 } |
| 1207 Str << "\n"; | 1208 Str << "\n"; |
| 1208 } | 1209 } |
| 1209 } | 1210 } |
| 1210 | 1211 |
| 1211 } // end of namespace Ice | 1212 } // end of namespace Ice |
| OLD | NEW |