Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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); | |
|
Jim Stichnoth
2014/09/10 18:44:23
Consider putting the whole method definition here,
Karl
2014/09/10 21:14:33
Done.
| |
| 32 IceString getAsmName() const { | 33 IceString getAsmName() const { |
| 33 return ".L" + Func->getFunctionName() + "$" + getName(); | 34 return ".L" + Func->getFunctionName() + "$" + getName(); |
| 34 } | 35 } |
| 35 | 36 |
| 36 // The HasReturn flag indicates that this node contains a return | 37 // The HasReturn flag indicates that this node contains a return |
| 37 // instruction and therefore needs an epilog. | 38 // instruction and therefore needs an epilog. |
| 38 void setHasReturn() { HasReturn = true; } | 39 void setHasReturn() { HasReturn = true; } |
| 39 bool getHasReturn() const { return HasReturn; } | 40 bool getHasReturn() const { return HasReturn; } |
| 40 | 41 |
| 41 // Access predecessor and successor edge lists. | 42 // Access predecessor and successor edge lists. |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 73 bool HasReturn; // does this block need an epilog? | 74 bool HasReturn; // does this block need an epilog? |
| 74 NodeList InEdges; // in no particular order | 75 NodeList InEdges; // in no particular order |
| 75 NodeList OutEdges; // in no particular order | 76 NodeList OutEdges; // in no particular order |
| 76 PhiList Phis; // unordered set of phi instructions | 77 PhiList Phis; // unordered set of phi instructions |
| 77 InstList Insts; // ordered list of non-phi instructions | 78 InstList Insts; // ordered list of non-phi instructions |
| 78 }; | 79 }; |
| 79 | 80 |
| 80 } // end of namespace Ice | 81 } // end of namespace Ice |
| 81 | 82 |
| 82 #endif // SUBZERO_SRC_ICECFGNODE_H | 83 #endif // SUBZERO_SRC_ICECFGNODE_H |
| OLD | NEW |