| 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 /// \file | 10 /// \file |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 736 dump("After recomputing liveness for -decorate-asm"); | 736 dump("After recomputing liveness for -decorate-asm"); |
| 737 } | 737 } |
| 738 OstreamLocker L(Ctx); | 738 OstreamLocker L(Ctx); |
| 739 Ostream &Str = Ctx->getStrEmit(); | 739 Ostream &Str = Ctx->getStrEmit(); |
| 740 IceString MangledName = Ctx->mangleName(getFunctionName()); | 740 IceString MangledName = Ctx->mangleName(getFunctionName()); |
| 741 const Assembler *Asm = getAssembler<>(); | 741 const Assembler *Asm = getAssembler<>(); |
| 742 const bool NeedSandboxing = Ctx->getFlags().getUseSandboxing(); | 742 const bool NeedSandboxing = Ctx->getFlags().getUseSandboxing(); |
| 743 | 743 |
| 744 emitTextHeader(MangledName, Ctx, Asm); | 744 emitTextHeader(MangledName, Ctx, Asm); |
| 745 deleteJumpTableInsts(); | 745 deleteJumpTableInsts(); |
| 746 if (Ctx->getFlags().getDecorateAsm()) { |
| 747 for (Variable *Var : getVariables()) { |
| 748 if (Var->getStackOffset()) { |
| 749 Str << "\t" << Var->getSymbolicStackOffset(this) << " = " |
| 750 << Var->getStackOffset() << "\n"; |
| 751 } |
| 752 } |
| 753 } |
| 746 for (CfgNode *Node : Nodes) { | 754 for (CfgNode *Node : Nodes) { |
| 747 if (NeedSandboxing && Node->needsAlignment()) { | 755 if (NeedSandboxing && Node->needsAlignment()) { |
| 748 Str << "\t" << Asm->getAlignDirective() << " " | 756 Str << "\t" << Asm->getAlignDirective() << " " |
| 749 << Asm->getBundleAlignLog2Bytes() << "\n"; | 757 << Asm->getBundleAlignLog2Bytes() << "\n"; |
| 750 } | 758 } |
| 751 Node->emit(this); | 759 Node->emit(this); |
| 752 } | 760 } |
| 753 emitJumpTables(); | 761 emitJumpTables(); |
| 754 Str << "\n"; | 762 Str << "\n"; |
| 755 } | 763 } |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 808 } | 816 } |
| 809 } | 817 } |
| 810 // Print each basic block | 818 // Print each basic block |
| 811 for (CfgNode *Node : Nodes) | 819 for (CfgNode *Node : Nodes) |
| 812 Node->dump(this); | 820 Node->dump(this); |
| 813 if (isVerbose(IceV_Instructions)) | 821 if (isVerbose(IceV_Instructions)) |
| 814 Str << "}\n"; | 822 Str << "}\n"; |
| 815 } | 823 } |
| 816 | 824 |
| 817 } // end of namespace Ice | 825 } // end of namespace Ice |
| OLD | NEW |