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

Side by Side Diff: src/IceCfg.h

Issue 1318553003: Compute the loop nest depth of each CfgNode and weight Variables by it. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 3 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 | « Makefile.standalone ('k') | 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 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 /// translator handle the function. 79 /// translator handle the function.
80 void setError(const IceString &Message); 80 void setError(const IceString &Message);
81 bool hasError() const { return HasError; } 81 bool hasError() const { return HasError; }
82 IceString getError() const { return ErrorMessage; } 82 IceString getError() const { return ErrorMessage; }
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. The loop
90 /// nest depth of the new node may not be valid if it is created after
91 /// computeLoopNestDepth.
90 CfgNode *makeNode(); 92 CfgNode *makeNode();
91 SizeT getNumNodes() const { return Nodes.size(); } 93 SizeT getNumNodes() const { return Nodes.size(); }
92 const NodeList &getNodes() const { return Nodes; } 94 const NodeList &getNodes() const { return Nodes; }
93 /// Swap nodes of Cfg with given list of nodes. 95 /// Swap nodes of Cfg with given list of nodes.
94 void swapNodes(NodeList &NewNodes); 96 void swapNodes(NodeList &NewNodes);
95 /// @} 97 /// @}
96 98
97 typedef int32_t IdentifierIndexType; 99 typedef int32_t IdentifierIndexType;
98 /// 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
99 /// argument to getIdentifierName(). No checking for duplicates is 101 /// argument to getIdentifierName(). No checking for duplicates is
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 void placePhiStores(); 184 void placePhiStores();
183 void deletePhis(); 185 void deletePhis();
184 void advancedPhiLowering(); 186 void advancedPhiLowering();
185 void reorderNodes(); 187 void reorderNodes();
186 void shuffleNodes(); 188 void shuffleNodes();
187 void doAddressOpt(); 189 void doAddressOpt();
188 void doArgLowering(); 190 void doArgLowering();
189 void doNopInsertion(); 191 void doNopInsertion();
190 void genCode(); 192 void genCode();
191 void genFrame(); 193 void genFrame();
194 void computeLoopNestDepth();
192 void livenessLightweight(); 195 void livenessLightweight();
193 void liveness(LivenessMode Mode); 196 void liveness(LivenessMode Mode);
194 bool validateLiveness() const; 197 bool validateLiveness() const;
195 void contractEmptyNodes(); 198 void contractEmptyNodes();
196 void doBranchOpt(); 199 void doBranchOpt();
197 void markNodesForSandboxing(); 200 void markNodesForSandboxing();
198 201
199 /// \name Manage the CurrentNode field. 202 /// \name Manage the CurrentNode field.
200 /// CurrentNode is used for validating the Variable::DefNode field during 203 /// CurrentNode is used for validating the Variable::DefNode field during
201 /// dumping/emitting. 204 /// dumping/emitting.
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
285 /// other uses are possible. 288 /// other uses are possible.
286 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); 289 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg);
287 290
288 public: 291 public:
289 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } 292 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); }
290 }; 293 };
291 294
292 } // end of namespace Ice 295 } // end of namespace Ice
293 296
294 #endif // SUBZERO_SRC_ICECFG_H 297 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « Makefile.standalone ('k') | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698