| 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 /// \file | 10 /// \file |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 void setName(const IceString &NewName) { | 39 void setName(const IceString &NewName) { |
| 40 // Make sure that the name can only be set once. | 40 // Make sure that the name can only be set once. |
| 41 assert(NameIndex == Cfg::IdentifierIndexInvalid); | 41 assert(NameIndex == Cfg::IdentifierIndexInvalid); |
| 42 if (!NewName.empty()) | 42 if (!NewName.empty()) |
| 43 NameIndex = Func->addIdentifierName(NewName); | 43 NameIndex = Func->addIdentifierName(NewName); |
| 44 } | 44 } |
| 45 IceString getAsmName() const { | 45 IceString getAsmName() const { |
| 46 return ".L" + Func->getFunctionName() + "$" + getName(); | 46 return ".L" + Func->getFunctionName() + "$" + getName(); |
| 47 } | 47 } |
| 48 | 48 |
| 49 void incrementLoopNestDepth() { ++LoopNestDepth; } |
| 50 void setLoopNestDepth(SizeT NewDepth) { LoopNestDepth = NewDepth; } |
| 51 SizeT getLoopNestDepth() const { return LoopNestDepth; } |
| 52 |
| 49 /// The HasReturn flag indicates that this node contains a return | 53 /// The HasReturn flag indicates that this node contains a return |
| 50 /// instruction and therefore needs an epilog. | 54 /// instruction and therefore needs an epilog. |
| 51 void setHasReturn() { HasReturn = true; } | 55 void setHasReturn() { HasReturn = true; } |
| 52 bool getHasReturn() const { return HasReturn; } | 56 bool getHasReturn() const { return HasReturn; } |
| 53 | 57 |
| 54 void setNeedsPlacement(bool Value) { NeedsPlacement = Value; } | 58 void setNeedsPlacement(bool Value) { NeedsPlacement = Value; } |
| 55 bool needsPlacement() const { return NeedsPlacement; } | 59 bool needsPlacement() const { return NeedsPlacement; } |
| 56 | 60 |
| 57 void setNeedsAlignment() { NeedsAlignment = true; } | 61 void setNeedsAlignment() { NeedsAlignment = true; } |
| 58 bool needsAlignment() const { return NeedsAlignment; } | 62 bool needsAlignment() const { return NeedsAlignment; } |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 104 void dump(Cfg *Func) const; | 108 void dump(Cfg *Func) const; |
| 105 | 109 |
| 106 void profileExecutionCount(VariableDeclaration *Var); | 110 void profileExecutionCount(VariableDeclaration *Var); |
| 107 | 111 |
| 108 private: | 112 private: |
| 109 CfgNode(Cfg *Func, SizeT LabelIndex); | 113 CfgNode(Cfg *Func, SizeT LabelIndex); |
| 110 Cfg *const Func; | 114 Cfg *const Func; |
| 111 SizeT Number; /// label index | 115 SizeT Number; /// label index |
| 112 Cfg::IdentifierIndexType NameIndex = | 116 Cfg::IdentifierIndexType NameIndex = |
| 113 Cfg::IdentifierIndexInvalid; /// index into Cfg::NodeNames table | 117 Cfg::IdentifierIndexInvalid; /// index into Cfg::NodeNames table |
| 118 SizeT LoopNestDepth = 0; /// the loop nest depth of this node |
| 114 bool HasReturn = false; /// does this block need an epilog? | 119 bool HasReturn = false; /// does this block need an epilog? |
| 115 bool NeedsPlacement = false; | 120 bool NeedsPlacement = false; |
| 116 bool NeedsAlignment = false; /// is sandboxing required? | 121 bool NeedsAlignment = false; /// is sandboxing required? |
| 117 InstNumberT InstCountEstimate = 0; /// rough instruction count estimate | 122 InstNumberT InstCountEstimate = 0; /// rough instruction count estimate |
| 118 NodeList InEdges; /// in no particular order | 123 NodeList InEdges; /// in no particular order |
| 119 NodeList OutEdges; /// in no particular order | 124 NodeList OutEdges; /// in no particular order |
| 120 PhiList Phis; /// unordered set of phi instructions | 125 PhiList Phis; /// unordered set of phi instructions |
| 121 InstList Insts; /// ordered list of non-phi instructions | 126 InstList Insts; /// ordered list of non-phi instructions |
| 122 }; | 127 }; |
| 123 | 128 |
| 124 } // end of namespace Ice | 129 } // end of namespace Ice |
| 125 | 130 |
| 126 #endif // SUBZERO_SRC_ICECFGNODE_H | 131 #endif // SUBZERO_SRC_ICECFGNODE_H |
| OLD | NEW |