Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(95)

Side by Side Diff: src/IceCfg.h

Issue 1275953002: Fix translator handling of basic block indices. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix nits. Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | src/IceCfg.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 /// @} 83 /// @}
84 84
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. 89 /// Create a node and append it to the end of the linearized list.
90 CfgNode *makeNode(); 90 CfgNode *makeNode();
91 SizeT getNumNodes() const { return Nodes.size(); } 91 SizeT getNumNodes() const { return Nodes.size(); }
92 const NodeList &getNodes() const { return Nodes; } 92 const NodeList &getNodes() const { return Nodes; }
93 /// Swap nodes of Cfg with given list of nodes.
94 void swapNodes(NodeList &NewNodes);
93 /// @} 95 /// @}
94 96
95 typedef int32_t IdentifierIndexType; 97 typedef int32_t IdentifierIndexType;
96 /// Adds a name to the list and returns its index, suitable for the 98 /// Adds a name to the list and returns its index, suitable for the
97 /// argument to getIdentifierName(). No checking for duplicates is 99 /// argument to getIdentifierName(). No checking for duplicates is
98 /// done. This is generally used for node names and variable names 100 /// done. This is generally used for node names and variable names
99 /// to avoid embedding a std::string inside an arena-allocated 101 /// to avoid embedding a std::string inside an arena-allocated
100 /// object. 102 /// object.
101 IdentifierIndexType addIdentifierName(const IceString &Name) { 103 IdentifierIndexType addIdentifierName(const IceString &Name) {
102 IdentifierIndexType Index = IdentifierNames.size(); 104 IdentifierIndexType Index = IdentifierNames.size();
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
281 /// other uses are possible. 283 /// other uses are possible.
282 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); 284 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg);
283 285
284 public: 286 public:
285 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } 287 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); }
286 }; 288 };
287 289
288 } // end of namespace Ice 290 } // end of namespace Ice
289 291
290 #endif // SUBZERO_SRC_ICECFG_H 292 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « no previous file | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698