| OLD | NEW |
| 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- C++ -*-===// | 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- C++ -*-===// |
| 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 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 /// @{ | 151 /// @{ |
| 152 std::unique_ptr<VariableDeclarationList> getGlobalInits() { | 152 std::unique_ptr<VariableDeclarationList> getGlobalInits() { |
| 153 return std::move(GlobalInits); | 153 return std::move(GlobalInits); |
| 154 } | 154 } |
| 155 void addGlobal(VariableDeclaration *Global) { | 155 void addGlobal(VariableDeclaration *Global) { |
| 156 if (GlobalInits == nullptr) { | 156 if (GlobalInits == nullptr) { |
| 157 GlobalInits.reset(new VariableDeclarationList); | 157 GlobalInits.reset(new VariableDeclarationList); |
| 158 } | 158 } |
| 159 GlobalInits->push_back(Global); | 159 GlobalInits->push_back(Global); |
| 160 } | 160 } |
| 161 VariableDeclarationList *getGlobalPool() { |
| 162 if (GlobalInits == nullptr) { |
| 163 GlobalInits.reset(new VariableDeclarationList); |
| 164 } |
| 165 return GlobalInits.get(); |
| 166 } |
| 161 /// @} | 167 /// @} |
| 162 | 168 |
| 163 /// \name Miscellaneous accessors. | 169 /// \name Miscellaneous accessors. |
| 164 /// @{ | 170 /// @{ |
| 165 TargetLowering *getTarget() const { return Target.get(); } | 171 TargetLowering *getTarget() const { return Target.get(); } |
| 166 VariablesMetadata *getVMetadata() const { return VMetadata.get(); } | 172 VariablesMetadata *getVMetadata() const { return VMetadata.get(); } |
| 167 Liveness *getLiveness() const { return Live.get(); } | 173 Liveness *getLiveness() const { return Live.get(); } |
| 168 template <typename T = Assembler> T *getAssembler() const { | 174 template <typename T = Assembler> T *getAssembler() const { |
| 169 return llvm::dyn_cast<T>(TargetAssembler.get()); | 175 return llvm::dyn_cast<T>(TargetAssembler.get()); |
| 170 } | 176 } |
| (...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 254 | 260 |
| 255 /// Adds a call to the ProfileSummary runtime function as the first | 261 /// Adds a call to the ProfileSummary runtime function as the first |
| 256 /// instruction in this CFG's entry block. | 262 /// instruction in this CFG's entry block. |
| 257 void addCallToProfileSummary(); | 263 void addCallToProfileSummary(); |
| 258 | 264 |
| 259 /// Iterates over the basic blocks in this CFG, adding profiling code to each | 265 /// Iterates over the basic blocks in this CFG, adding profiling code to each |
| 260 /// one of them. It returns a list with all the globals that the profiling | 266 /// one of them. It returns a list with all the globals that the profiling |
| 261 /// code needs to be defined. | 267 /// code needs to be defined. |
| 262 void profileBlocks(); | 268 void profileBlocks(); |
| 263 | 269 |
| 270 void createNodeNameDeclaration(const IceString &NodeAsmName); |
| 271 void |
| 272 createBlockProfilingInfoDeclaration(const IceString &NodeAsmName, |
| 273 VariableDeclaration *NodeNameDeclaration); |
| 274 |
| 264 /// Delete registered jump table placeholder instructions. This should only be | 275 /// Delete registered jump table placeholder instructions. This should only be |
| 265 /// called once all repointing has taken place. | 276 /// called once all repointing has taken place. |
| 266 void deleteJumpTableInsts(); | 277 void deleteJumpTableInsts(); |
| 267 /// Iterate through the registered jump tables and emit them. | 278 /// Iterate through the registered jump tables and emit them. |
| 268 void emitJumpTables(); | 279 void emitJumpTables(); |
| 269 | 280 |
| 270 enum AllocaBaseVariableType { | 281 enum AllocaBaseVariableType { |
| 271 BVT_StackPointer, | 282 BVT_StackPointer, |
| 272 BVT_FramePointer, | 283 BVT_FramePointer, |
| 273 BVT_UserPointer | 284 BVT_UserPointer |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 322 |
| 312 public: | 323 public: |
| 313 static void TlsInit() { CfgAllocatorTraits::init(); } | 324 static void TlsInit() { CfgAllocatorTraits::init(); } |
| 314 }; | 325 }; |
| 315 | 326 |
| 316 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); | 327 template <> Variable *Cfg::makeVariable<Variable>(Type Ty); |
| 317 | 328 |
| 318 } // end of namespace Ice | 329 } // end of namespace Ice |
| 319 | 330 |
| 320 #endif // SUBZERO_SRC_ICECFG_H | 331 #endif // SUBZERO_SRC_ICECFG_H |
| OLD | NEW |