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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1068 OstreamLocker L(Ctx); | 1068 OstreamLocker L(Ctx); |
1069 Ostream &Str = Ctx->getStrEmit(); | 1069 Ostream &Str = Ctx->getStrEmit(); |
1070 const Assembler *Asm = getAssembler<>(); | 1070 const Assembler *Asm = getAssembler<>(); |
1071 const bool NeedSandboxing = getFlags().getUseSandboxing(); | 1071 const bool NeedSandboxing = getFlags().getUseSandboxing(); |
1072 | 1072 |
1073 emitTextHeader(FunctionName, Ctx, Asm); | 1073 emitTextHeader(FunctionName, Ctx, Asm); |
1074 deleteJumpTableInsts(); | 1074 deleteJumpTableInsts(); |
1075 if (getFlags().getDecorateAsm()) { | 1075 if (getFlags().getDecorateAsm()) { |
1076 for (Variable *Var : getVariables()) { | 1076 for (Variable *Var : getVariables()) { |
1077 if (Var->getStackOffset() && !Var->isRematerializable()) { | 1077 if (Var->getStackOffset() && !Var->isRematerializable()) { |
1078 Str << "\t" << Var->getSymbolicStackOffset(this) << " = " | 1078 Str << "\t" << Var->getSymbolicStackOffset() << " = " |
1079 << Var->getStackOffset() << "\n"; | 1079 << Var->getStackOffset() << "\n"; |
1080 } | 1080 } |
1081 } | 1081 } |
1082 } | 1082 } |
1083 for (CfgNode *Node : Nodes) { | 1083 for (CfgNode *Node : Nodes) { |
1084 if (NeedSandboxing && Node->needsAlignment()) { | 1084 if (NeedSandboxing && Node->needsAlignment()) { |
1085 Str << "\t" << Asm->getAlignDirective() << " " | 1085 Str << "\t" << Asm->getAlignDirective() << " " |
1086 << Asm->getBundleAlignLog2Bytes() << "\n"; | 1086 << Asm->getBundleAlignLog2Bytes() << "\n"; |
1087 } | 1087 } |
1088 Node->emit(this); | 1088 Node->emit(this); |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 } | 1181 } |
1182 } | 1182 } |
1183 // Print each basic block | 1183 // Print each basic block |
1184 for (CfgNode *Node : Nodes) | 1184 for (CfgNode *Node : Nodes) |
1185 Node->dump(this); | 1185 Node->dump(this); |
1186 if (isVerbose(IceV_Instructions)) | 1186 if (isVerbose(IceV_Instructions)) |
1187 Str << "}\n"; | 1187 Str << "}\n"; |
1188 } | 1188 } |
1189 | 1189 |
1190 } // end of namespace Ice | 1190 } // end of namespace Ice |
OLD | NEW |