Chromium Code Reviews| 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 296 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 307 << "\n\n"; | 307 << "\n\n"; |
| 308 } | 308 } |
| 309 Str << "\t.text\n"; | 309 Str << "\t.text\n"; |
| 310 IceString MangledName = getContext()->mangleName(getFunctionName()); | 310 IceString MangledName = getContext()->mangleName(getFunctionName()); |
| 311 if (Ctx->getFlags().FunctionSections) | 311 if (Ctx->getFlags().FunctionSections) |
| 312 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n"; | 312 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n"; |
| 313 if (!getInternal()) { | 313 if (!getInternal()) { |
| 314 Str << "\t.globl\t" << MangledName << "\n"; | 314 Str << "\t.globl\t" << MangledName << "\n"; |
| 315 Str << "\t.type\t" << MangledName << ",@function\n"; | 315 Str << "\t.type\t" << MangledName << ",@function\n"; |
| 316 } | 316 } |
| 317 Str << "\t.p2align " << getTarget()->getBundleP2Align() << "\n"; | |
|
Jim Stichnoth
2014/08/28 20:26:12
Should we consider padding with a halt sled, just
jvoung (off chromium)
2014/08/28 21:02:22
We could do that. Added a hook for now.
I'm not s
Jim Stichnoth
2014/08/28 21:22:21
I'd kind of hope that if this performance differen
| |
| 317 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E; | 318 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E; |
| 318 ++I) { | 319 ++I) { |
| 319 (*I)->emit(this); | 320 (*I)->emit(this); |
| 320 } | 321 } |
| 321 Str << "\n"; | 322 Str << "\n"; |
| 322 T_emit.printElapsedUs(Ctx, "emit()"); | 323 T_emit.printElapsedUs(Ctx, "emit()"); |
| 323 } | 324 } |
| 324 | 325 |
| 325 // Dumps the IR with an optional introductory message. | 326 // Dumps the IR with an optional introductory message. |
| 326 void Cfg::dump(const IceString &Message) { | 327 void Cfg::dump(const IceString &Message) { |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 368 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E; | 369 for (NodeList::const_iterator I = Nodes.begin(), E = Nodes.end(); I != E; |
| 369 ++I) { | 370 ++I) { |
| 370 (*I)->dump(this); | 371 (*I)->dump(this); |
| 371 } | 372 } |
| 372 if (getContext()->isVerbose(IceV_Instructions)) { | 373 if (getContext()->isVerbose(IceV_Instructions)) { |
| 373 Str << "}\n"; | 374 Str << "}\n"; |
| 374 } | 375 } |
| 375 } | 376 } |
| 376 | 377 |
| 377 } // end of namespace Ice | 378 } // end of namespace Ice |
| OLD | NEW |