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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 429 if (Ctx->getFlags().getFunctionSections()) | 429 if (Ctx->getFlags().getFunctionSections()) |
| 430 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n"; | 430 Str << "\t.section\t.text." << MangledName << ",\"ax\",@progbits\n"; |
| 431 if (!Asm->getInternal() || Ctx->getFlags().getDisableInternal()) { | 431 if (!Asm->getInternal() || Ctx->getFlags().getDisableInternal()) { |
| 432 Str << "\t.globl\t" << MangledName << "\n"; | 432 Str << "\t.globl\t" << MangledName << "\n"; |
| 433 Str << "\t.type\t" << MangledName << ",@function\n"; | 433 Str << "\t.type\t" << MangledName << ",@function\n"; |
| 434 } | 434 } |
| 435 Str << "\t.p2align " << Asm->getBundleAlignLog2Bytes() << ",0x"; | 435 Str << "\t.p2align " << Asm->getBundleAlignLog2Bytes() << ",0x"; |
| 436 for (uint8_t I : Asm->getNonExecBundlePadding()) | 436 for (uint8_t I : Asm->getNonExecBundlePadding()) |
| 437 Str.write_hex(I); | 437 Str.write_hex(I); |
| 438 Str << "\n"; | 438 Str << "\n"; |
| 439 Str << "\t.bundle_align_mode " << Asm->getBundleAlignLog2Bytes() << "\n"; | |
|
jvoung (off chromium)
2015/02/19 21:01:47
Should this only be for getUseSandboxing()?
Jim Stichnoth
2015/02/19 23:17:38
Oops, done.
| |
| 439 Str << MangledName << ":\n"; | 440 Str << MangledName << ":\n"; |
| 440 } | 441 } |
| 441 | 442 |
| 442 void Cfg::emit() { | 443 void Cfg::emit() { |
| 443 if (!ALLOW_DUMP) | 444 if (!ALLOW_DUMP) |
| 444 return; | 445 return; |
| 445 TimerMarker T(TimerStack::TT_emit, this); | 446 TimerMarker T(TimerStack::TT_emit, this); |
| 446 if (Ctx->getFlags().getDecorateAsm()) { | 447 if (Ctx->getFlags().getDecorateAsm()) { |
| 447 renumberInstructions(); | 448 renumberInstructions(); |
| 448 getVMetadata()->init(VMK_Uses); | 449 getVMetadata()->init(VMK_Uses); |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 507 } | 508 } |
| 508 } | 509 } |
| 509 // Print each basic block | 510 // Print each basic block |
| 510 for (CfgNode *Node : Nodes) | 511 for (CfgNode *Node : Nodes) |
| 511 Node->dump(this); | 512 Node->dump(this); |
| 512 if (isVerbose(IceV_Instructions)) | 513 if (isVerbose(IceV_Instructions)) |
| 513 Str << "}\n"; | 514 Str << "}\n"; |
| 514 } | 515 } |
| 515 | 516 |
| 516 } // end of namespace Ice | 517 } // end of namespace Ice |
| OLD | NEW |