| 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 blockProfilingInfoDeclaration(GlobalContext *Ctx, const IceString &NodeAsmName, | 141 blockProfilingInfoDeclaration(GlobalContext *Ctx, const IceString &NodeAsmName, |
| 142 VariableDeclaration *NodeNameDeclaration) { | 142 VariableDeclaration *NodeNameDeclaration) { |
| 143 auto *Var = VariableDeclaration::create(Ctx); | 143 auto *Var = VariableDeclaration::create(Ctx); |
| 144 Var->setName(BlockStatsGlobalPrefix + NodeAsmName); | 144 Var->setName(BlockStatsGlobalPrefix + NodeAsmName); |
| 145 const SizeT Int64ByteSize = typeWidthInBytes(IceType_i64); | 145 const SizeT Int64ByteSize = typeWidthInBytes(IceType_i64); |
| 146 Var->addInitializer( | 146 Var->addInitializer( |
| 147 VariableDeclaration::ZeroInitializer::create(Int64ByteSize)); | 147 VariableDeclaration::ZeroInitializer::create(Int64ByteSize)); |
| 148 | 148 |
| 149 const RelocOffsetT NodeNameDeclarationOffset = 0; | 149 const RelocOffsetT NodeNameDeclarationOffset = 0; |
| 150 Var->addInitializer(VariableDeclaration::RelocInitializer::create( | 150 Var->addInitializer(VariableDeclaration::RelocInitializer::create( |
| 151 NodeNameDeclaration, NodeNameDeclarationOffset)); | 151 NodeNameDeclaration, |
| 152 {RelocOffset::create(Ctx, NodeNameDeclarationOffset)})); |
| 152 Var->setAlignment(Int64ByteSize); | 153 Var->setAlignment(Int64ByteSize); |
| 153 return Var; | 154 return Var; |
| 154 } | 155 } |
| 155 } // end of anonymous namespace | 156 } // end of anonymous namespace |
| 156 | 157 |
| 157 void Cfg::profileBlocks() { | 158 void Cfg::profileBlocks() { |
| 158 if (GlobalInits == nullptr) | 159 if (GlobalInits == nullptr) |
| 159 GlobalInits.reset(new VariableDeclarationList()); | 160 GlobalInits.reset(new VariableDeclarationList()); |
| 160 | 161 |
| 161 for (CfgNode *Node : Nodes) { | 162 for (CfgNode *Node : Nodes) { |
| (...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1134 } | 1135 } |
| 1135 } | 1136 } |
| 1136 // Print each basic block | 1137 // Print each basic block |
| 1137 for (CfgNode *Node : Nodes) | 1138 for (CfgNode *Node : Nodes) |
| 1138 Node->dump(this); | 1139 Node->dump(this); |
| 1139 if (isVerbose(IceV_Instructions)) | 1140 if (isVerbose(IceV_Instructions)) |
| 1140 Str << "}\n"; | 1141 Str << "}\n"; |
| 1141 } | 1142 } |
| 1142 | 1143 |
| 1143 } // end of namespace Ice | 1144 } // end of namespace Ice |
| OLD | NEW |