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 477 matching lines...) Loading... |
488 Ostream &Str = Ctx->getStrEmit(); | 488 Ostream &Str = Ctx->getStrEmit(); |
489 IceString MangledName = getContext()->mangleName(getFunctionName()); | 489 IceString MangledName = getContext()->mangleName(getFunctionName()); |
490 emitTextHeader(MangledName, Ctx, getAssembler<>()); | 490 emitTextHeader(MangledName, Ctx, getAssembler<>()); |
491 for (CfgNode *Node : Nodes) | 491 for (CfgNode *Node : Nodes) |
492 Node->emit(this); | 492 Node->emit(this); |
493 Str << "\n"; | 493 Str << "\n"; |
494 } | 494 } |
495 | 495 |
496 void Cfg::emitIAS() { | 496 void Cfg::emitIAS() { |
497 TimerMarker T(TimerStack::TT_emit, this); | 497 TimerMarker T(TimerStack::TT_emit, this); |
498 assert(!Ctx->getFlags().getDecorateAsm()); | |
499 // The emitIAS() routines emit into the internal assembler buffer, | 498 // The emitIAS() routines emit into the internal assembler buffer, |
500 // so there's no need to lock the streams. | 499 // so there's no need to lock the streams. |
501 for (CfgNode *Node : Nodes) | 500 for (CfgNode *Node : Nodes) |
502 Node->emitIAS(this); | 501 Node->emitIAS(this); |
503 } | 502 } |
504 | 503 |
505 // Dumps the IR with an optional introductory message. | 504 // Dumps the IR with an optional introductory message. |
506 void Cfg::dump(const IceString &Message) { | 505 void Cfg::dump(const IceString &Message) { |
507 if (!ALLOW_DUMP) | 506 if (!ALLOW_DUMP) |
508 return; | 507 return; |
(...skipping 33 matching lines...) Loading... |
542 } | 541 } |
543 } | 542 } |
544 // Print each basic block | 543 // Print each basic block |
545 for (CfgNode *Node : Nodes) | 544 for (CfgNode *Node : Nodes) |
546 Node->dump(this); | 545 Node->dump(this); |
547 if (isVerbose(IceV_Instructions)) | 546 if (isVerbose(IceV_Instructions)) |
548 Str << "}\n"; | 547 Str << "}\n"; |
549 } | 548 } |
550 | 549 |
551 } // end of namespace Ice | 550 } // end of namespace Ice |
OLD | NEW |