| 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 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 89 /// Create a node and append it to the end of the linearized list. The loop | 89 /// Create a node and append it to the end of the linearized list. The loop |
| 90 /// nest depth of the new node may not be valid if it is created after | 90 /// nest depth of the new node may not be valid if it is created after |
| 91 /// computeLoopNestDepth. | 91 /// computeLoopNestDepth. |
| 92 CfgNode *makeNode(); | 92 CfgNode *makeNode(); |
| 93 SizeT getNumNodes() const { return Nodes.size(); } | 93 SizeT getNumNodes() const { return Nodes.size(); } |
| 94 const NodeList &getNodes() const { return Nodes; } | 94 const NodeList &getNodes() const { return Nodes; } |
| 95 /// Swap nodes of Cfg with given list of nodes. | 95 /// Swap nodes of Cfg with given list of nodes. |
| 96 void swapNodes(NodeList &NewNodes); | 96 void swapNodes(NodeList &NewNodes); |
| 97 /// @} | 97 /// @} |
| 98 | 98 |
| 99 typedef int32_t IdentifierIndexType; | 99 using IdentifierIndexType = int32_t; |
| 100 /// Adds a name to the list and returns its index, suitable for the | 100 /// Adds a name to the list and returns its index, suitable for the |
| 101 /// argument to getIdentifierName(). No checking for duplicates is | 101 /// argument to getIdentifierName(). No checking for duplicates is |
| 102 /// done. This is generally used for node names and variable names | 102 /// done. This is generally used for node names and variable names |
| 103 /// to avoid embedding a std::string inside an arena-allocated | 103 /// to avoid embedding a std::string inside an arena-allocated |
| 104 /// object. | 104 /// object. |
| 105 IdentifierIndexType addIdentifierName(const IceString &Name) { | 105 IdentifierIndexType addIdentifierName(const IceString &Name) { |
| 106 IdentifierIndexType Index = IdentifierNames.size(); | 106 IdentifierIndexType Index = IdentifierNames.size(); |
| 107 IdentifierNames.push_back(Name); | 107 IdentifierNames.push_back(Name); |
| 108 return Index; | 108 return Index; |
| 109 } | 109 } |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 /// other uses are possible. | 288 /// other uses are possible. |
| 289 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); | 289 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); |
| 290 | 290 |
| 291 public: | 291 public: |
| 292 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } | 292 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } |
| 293 }; | 293 }; |
| 294 | 294 |
| 295 } // end of namespace Ice | 295 } // end of namespace Ice |
| 296 | 296 |
| 297 #endif // SUBZERO_SRC_ICECFG_H | 297 #endif // SUBZERO_SRC_ICECFG_H |
| OLD | NEW |