| 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 85 /// \name Manage nodes (a.k.a. basic blocks, CfgNodes). | 85 /// \name Manage nodes (a.k.a. basic blocks, CfgNodes). |
| 86 /// @{ | 86 /// @{ |
| 87 void setEntryNode(CfgNode *EntryNode) { Entry = EntryNode; } | 87 void setEntryNode(CfgNode *EntryNode) { Entry = EntryNode; } |
| 88 CfgNode *getEntryNode() const { return Entry; } | 88 CfgNode *getEntryNode() const { return Entry; } |
| 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. The number of nodes must |
| 96 /// remain unchanged. |
| 96 void swapNodes(NodeList &NewNodes); | 97 void swapNodes(NodeList &NewNodes); |
| 97 /// @} | 98 /// @} |
| 98 | 99 |
| 99 typedef int32_t IdentifierIndexType; | 100 typedef int32_t IdentifierIndexType; |
| 100 /// Adds a name to the list and returns its index, suitable for the | 101 /// Adds a name to the list and returns its index, suitable for the |
| 101 /// argument to getIdentifierName(). No checking for duplicates is | 102 /// argument to getIdentifierName(). No checking for duplicates is |
| 102 /// done. This is generally used for node names and variable names | 103 /// done. This is generally used for node names and variable names |
| 103 /// to avoid embedding a std::string inside an arena-allocated | 104 /// to avoid embedding a std::string inside an arena-allocated |
| 104 /// object. | 105 /// object. |
| 105 IdentifierIndexType addIdentifierName(const IceString &Name) { | 106 IdentifierIndexType addIdentifierName(const IceString &Name) { |
| (...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 /// other uses are possible. | 289 /// other uses are possible. |
| 289 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); | 290 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); |
| 290 | 291 |
| 291 public: | 292 public: |
| 292 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } | 293 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } |
| 293 }; | 294 }; |
| 294 | 295 |
| 295 } // end of namespace Ice | 296 } // end of namespace Ice |
| 296 | 297 |
| 297 #endif // SUBZERO_SRC_ICECFG_H | 298 #endif // SUBZERO_SRC_ICECFG_H |
| OLD | NEW |