| 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 173 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // instruction and delete the old. | 184 // instruction and delete the old. |
| 185 void CfgNode::doAddressOpt() { | 185 void CfgNode::doAddressOpt() { |
| 186 TargetLowering *Target = Func->getTarget(); | 186 TargetLowering *Target = Func->getTarget(); |
| 187 LoweringContext &Context = Target->getContext(); | 187 LoweringContext &Context = Target->getContext(); |
| 188 Context.init(this); | 188 Context.init(this); |
| 189 while (!Context.atEnd()) { | 189 while (!Context.atEnd()) { |
| 190 Target->doAddressOpt(); | 190 Target->doAddressOpt(); |
| 191 } | 191 } |
| 192 } | 192 } |
| 193 | 193 |
| 194 void CfgNode::doNopInsertion() { |
| 195 TargetLowering *Target = Func->getTarget(); |
| 196 LoweringContext &Context = Target->getContext(); |
| 197 Context.init(this); |
| 198 while (!Context.atEnd()) { |
| 199 Target->doNopInsertion(); |
| 200 } |
| 201 } |
| 202 |
| 194 // Drives the target lowering. Passes the current instruction and the | 203 // Drives the target lowering. Passes the current instruction and the |
| 195 // next non-deleted instruction for target lowering. | 204 // next non-deleted instruction for target lowering. |
| 196 void CfgNode::genCode() { | 205 void CfgNode::genCode() { |
| 197 TargetLowering *Target = Func->getTarget(); | 206 TargetLowering *Target = Func->getTarget(); |
| 198 LoweringContext &Context = Target->getContext(); | 207 LoweringContext &Context = Target->getContext(); |
| 199 // Lower only the regular instructions. Defer the Phi instructions. | 208 // Lower only the regular instructions. Defer the Phi instructions. |
| 200 Context.init(this); | 209 Context.init(this); |
| 201 while (!Context.atEnd()) { | 210 while (!Context.atEnd()) { |
| 202 InstList::iterator Orig = Context.getCur(); | 211 InstList::iterator Orig = Context.getCur(); |
| 203 if (llvm::isa<InstRet>(*Orig)) | 212 if (llvm::isa<InstRet>(*Orig)) |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 485 I != E; ++I) { | 494 I != E; ++I) { |
| 486 if (I != OutEdges.begin()) | 495 if (I != OutEdges.begin()) |
| 487 Str << ", "; | 496 Str << ", "; |
| 488 Str << "%" << (*I)->getName(); | 497 Str << "%" << (*I)->getName(); |
| 489 } | 498 } |
| 490 Str << "\n"; | 499 Str << "\n"; |
| 491 } | 500 } |
| 492 } | 501 } |
| 493 | 502 |
| 494 } // end of namespace Ice | 503 } // end of namespace Ice |
| OLD | NEW |