| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 } | 110 } |
| 111 } | 111 } |
| 112 | 112 |
| 113 void Cfg::doAddressOpt() { | 113 void Cfg::doAddressOpt() { |
| 114 for (NodeList::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) { | 114 for (NodeList::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) { |
| 115 (*I)->doAddressOpt(); | 115 (*I)->doAddressOpt(); |
| 116 } | 116 } |
| 117 } | 117 } |
| 118 | 118 |
| 119 void Cfg::genCode() { | 119 void Cfg::genCode() { |
| 120 getTarget()->lowerArguments(); |
| 120 for (NodeList::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) { | 121 for (NodeList::iterator I = Nodes.begin(), E = Nodes.end(); I != E; ++I) { |
| 121 (*I)->genCode(); | 122 (*I)->genCode(); |
| 122 } | 123 } |
| 123 } | 124 } |
| 124 | 125 |
| 125 // Compute the stack frame layout. | 126 // Compute the stack frame layout. |
| 126 void Cfg::genFrame() { | 127 void Cfg::genFrame() { |
| 127 getTarget()->addProlog(Entry); | 128 getTarget()->addProlog(Entry); |
| 128 // TODO: Consider folding epilog generation into the final | 129 // TODO: Consider folding epilog generation into the final |
| 129 // emission/assembly pass to avoid an extra iteration over the node | 130 // emission/assembly pass to avoid an extra iteration over the node |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E; | 349 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E; |
| 349 ++I) { | 350 ++I) { |
| 350 (*I)->dump(this); | 351 (*I)->dump(this); |
| 351 } | 352 } |
| 352 if (getContext()->isVerbose(IceV_Instructions)) { | 353 if (getContext()->isVerbose(IceV_Instructions)) { |
| 353 Str << "}\n"; | 354 Str << "}\n"; |
| 354 } | 355 } |
| 355 } | 356 } |
| 356 | 357 |
| 357 } // end of namespace Ice | 358 } // end of namespace Ice |
| OLD | NEW |