| OLD | NEW |
| 1 //===- subzero/src/IceCfg.cpp - Control flow graph implementation ---------===// | 1 //===- subzero/src/IceCfg.cpp - Control flow graph 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 Cfg class, including constant pool | 10 // This file implements the Cfg class, including constant pool |
| (...skipping 30 matching lines...) Expand all Loading... |
| 41 Ctx->getStrDump() << "ICE translation error: " << ErrorMessage << "\n"; | 41 Ctx->getStrDump() << "ICE translation error: " << ErrorMessage << "\n"; |
| 42 } | 42 } |
| 43 | 43 |
| 44 CfgNode *Cfg::makeNode(const IceString &Name) { | 44 CfgNode *Cfg::makeNode(const IceString &Name) { |
| 45 SizeT LabelIndex = Nodes.size(); | 45 SizeT LabelIndex = Nodes.size(); |
| 46 CfgNode *Node = CfgNode::create(this, LabelIndex, Name); | 46 CfgNode *Node = CfgNode::create(this, LabelIndex, Name); |
| 47 Nodes.push_back(Node); | 47 Nodes.push_back(Node); |
| 48 return Node; | 48 return Node; |
| 49 } | 49 } |
| 50 | 50 |
| 51 Variable *Cfg::makeVariable(Type Ty, const IceString &Name) { | |
| 52 return makeVariable<Variable>(Ty, Name); | |
| 53 } | |
| 54 | |
| 55 void Cfg::addArg(Variable *Arg) { | 51 void Cfg::addArg(Variable *Arg) { |
| 56 Arg->setIsArg(); | 52 Arg->setIsArg(); |
| 57 Args.push_back(Arg); | 53 Args.push_back(Arg); |
| 58 } | 54 } |
| 59 | 55 |
| 60 void Cfg::addImplicitArg(Variable *Arg) { | 56 void Cfg::addImplicitArg(Variable *Arg) { |
| 61 Arg->setIsImplicitArg(); | 57 Arg->setIsImplicitArg(); |
| 62 ImplicitArgs.push_back(Arg); | 58 ImplicitArgs.push_back(Arg); |
| 63 } | 59 } |
| 64 | 60 |
| (...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 377 } | 373 } |
| 378 } | 374 } |
| 379 // Print each basic block | 375 // Print each basic block |
| 380 for (CfgNode *Node : Nodes) | 376 for (CfgNode *Node : Nodes) |
| 381 Node->dump(this); | 377 Node->dump(this); |
| 382 if (getContext()->isVerbose(IceV_Instructions)) | 378 if (getContext()->isVerbose(IceV_Instructions)) |
| 383 Str << "}\n"; | 379 Str << "}\n"; |
| 384 } | 380 } |
| 385 | 381 |
| 386 } // end of namespace Ice | 382 } // end of namespace Ice |
| OLD | NEW |