| 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 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 void contractIfEmpty(); | 109 void contractIfEmpty(); |
| 110 void doBranchOpt(const CfgNode *NextNode); | 110 void doBranchOpt(const CfgNode *NextNode); |
| 111 void emit(Cfg *Func) const; | 111 void emit(Cfg *Func) const; |
| 112 void emitIAS(Cfg *Func) const; | 112 void emitIAS(Cfg *Func) const; |
| 113 void dump(Cfg *Func) const; | 113 void dump(Cfg *Func) const; |
| 114 | 114 |
| 115 void profileExecutionCount(VariableDeclaration *Var); | 115 void profileExecutionCount(VariableDeclaration *Var); |
| 116 | 116 |
| 117 void addOutEdge(CfgNode *Out) { OutEdges.push_back(Out); } | 117 void addOutEdge(CfgNode *Out) { OutEdges.push_back(Out); } |
| 118 void addInEdge(CfgNode *In) { InEdges.push_back(In); } | 118 void addInEdge(CfgNode *In) { InEdges.push_back(In); } |
| 119 void replaceInEdge(CfgNode *Old, CfgNode *New); |
| 120 void removeAllOutEdges() { OutEdges.clear(); } |
| 121 void removeInEdge(CfgNode *In); |
| 119 | 122 |
| 120 bool hasSingleOutEdge() const { | 123 bool hasSingleOutEdge() const { |
| 121 return (getOutEdges().size() == 1 || getOutEdges()[0] == getOutEdges()[1]); | 124 return (getOutEdges().size() == 1 || getOutEdges()[0] == getOutEdges()[1]); |
| 122 } | 125 } |
| 126 CfgNode *shortCircuit(); |
| 123 | 127 |
| 124 private: | 128 private: |
| 125 CfgNode(Cfg *Func, SizeT Number) | 129 CfgNode(Cfg *Func, SizeT Number) |
| 126 : Func(Func), Number(Number), NumberOrig(Number), | 130 : Func(Func), Number(Number), NumberOrig(Number), |
| 127 Name(NodeString::createWithoutString(Func)) {} | 131 Name(NodeString::createWithoutString(Func)) {} |
| 128 bool livenessValidateIntervals(Liveness *Liveness) const; | 132 bool livenessValidateIntervals(Liveness *Liveness) const; |
| 129 Cfg *const Func; | 133 Cfg *const Func; |
| 130 SizeT Number; /// invariant: Func->Nodes[Number]==this | 134 SizeT Number; /// invariant: Func->Nodes[Number]==this |
| 131 const SizeT NumberOrig; /// used for name auto-generation | 135 const SizeT NumberOrig; /// used for name auto-generation |
| 132 NodeString Name; | 136 NodeString Name; |
| 133 SizeT LoopNestDepth = 0; /// the loop nest depth of this node | 137 SizeT LoopNestDepth = 0; /// the loop nest depth of this node |
| 134 bool HasReturn = false; /// does this block need an epilog? | 138 bool HasReturn = false; /// does this block need an epilog? |
| 135 bool NeedsPlacement = false; | 139 bool NeedsPlacement = false; |
| 136 bool NeedsAlignment = false; /// is sandboxing required? | 140 bool NeedsAlignment = false; /// is sandboxing required? |
| 137 InstNumberT InstCountEstimate = 0; /// rough instruction count estimate | 141 InstNumberT InstCountEstimate = 0; /// rough instruction count estimate |
| 138 NodeList InEdges; /// in no particular order | 142 NodeList InEdges; /// in no particular order |
| 139 NodeList OutEdges; /// in no particular order | 143 NodeList OutEdges; /// in no particular order |
| 140 PhiList Phis; /// unordered set of phi instructions | 144 PhiList Phis; /// unordered set of phi instructions |
| 141 InstList Insts; /// ordered list of non-phi instructions | 145 InstList Insts; /// ordered list of non-phi instructions |
| 142 }; | 146 }; |
| 143 | 147 |
| 144 } // end of namespace Ice | 148 } // end of namespace Ice |
| 145 | 149 |
| 146 #endif // SUBZERO_SRC_ICECFGNODE_H | 150 #endif // SUBZERO_SRC_ICECFGNODE_H |
| OLD | NEW |