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

Side by Side Diff: src/IceCfgNode.h

Issue 561823002: Fix symbol table handling in functions. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Fix issues in patch set 2 raised by Jim. Created 6 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 | « no previous file | src/IceOperand.h » ('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/IceCfgNode.h - Control flow graph node -------*- C++ -*-===// 1 //===- subzero/src/IceCfgNode.h - Control flow graph node -------*- 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 // This file declares the CfgNode class, which represents a single 10 // This file declares the CfgNode class, which represents a single
(...skipping 11 matching lines...) Expand all
22 22
23 class CfgNode { 23 class CfgNode {
24 public: 24 public:
25 static CfgNode *create(Cfg *Func, SizeT LabelIndex, IceString Name = "") { 25 static CfgNode *create(Cfg *Func, SizeT LabelIndex, IceString Name = "") {
26 return new (Func->allocate<CfgNode>()) CfgNode(Func, LabelIndex, Name); 26 return new (Func->allocate<CfgNode>()) CfgNode(Func, LabelIndex, Name);
27 } 27 }
28 28
29 // Access the label number and name for this node. 29 // Access the label number and name for this node.
30 SizeT getIndex() const { return Number; } 30 SizeT getIndex() const { return Number; }
31 IceString getName() const; 31 IceString getName() const;
32 void setName(IceString &NewName) {
33 // Make sure that the name can only be set once.
34 assert(Name.empty());
35 Name = NewName;
36 }
32 IceString getAsmName() const { 37 IceString getAsmName() const {
33 return ".L" + Func->getFunctionName() + "$" + getName(); 38 return ".L" + Func->getFunctionName() + "$" + getName();
34 } 39 }
35 40
36 // The HasReturn flag indicates that this node contains a return 41 // The HasReturn flag indicates that this node contains a return
37 // instruction and therefore needs an epilog. 42 // instruction and therefore needs an epilog.
38 void setHasReturn() { HasReturn = true; } 43 void setHasReturn() { HasReturn = true; }
39 bool getHasReturn() const { return HasReturn; } 44 bool getHasReturn() const { return HasReturn; }
40 45
41 // Access predecessor and successor edge lists. 46 // Access predecessor and successor edge lists.
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 bool HasReturn; // does this block need an epilog? 78 bool HasReturn; // does this block need an epilog?
74 NodeList InEdges; // in no particular order 79 NodeList InEdges; // in no particular order
75 NodeList OutEdges; // in no particular order 80 NodeList OutEdges; // in no particular order
76 PhiList Phis; // unordered set of phi instructions 81 PhiList Phis; // unordered set of phi instructions
77 InstList Insts; // ordered list of non-phi instructions 82 InstList Insts; // ordered list of non-phi instructions
78 }; 83 };
79 84
80 } // end of namespace Ice 85 } // end of namespace Ice
81 86
82 #endif // SUBZERO_SRC_ICECFGNODE_H 87 #endif // SUBZERO_SRC_ICECFGNODE_H
OLDNEW
« no previous file with comments | « no previous file | src/IceOperand.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698