| 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 27 matching lines...) Expand all Loading... |
| 38 void setHasReturn() { HasReturn = true; } | 38 void setHasReturn() { HasReturn = true; } |
| 39 bool getHasReturn() const { return HasReturn; } | 39 bool getHasReturn() const { return HasReturn; } |
| 40 | 40 |
| 41 // Access predecessor and successor edge lists. | 41 // Access predecessor and successor edge lists. |
| 42 const NodeList &getInEdges() const { return InEdges; } | 42 const NodeList &getInEdges() const { return InEdges; } |
| 43 const NodeList &getOutEdges() const { return OutEdges; } | 43 const NodeList &getOutEdges() const { return OutEdges; } |
| 44 | 44 |
| 45 // Manage the instruction list. | 45 // Manage the instruction list. |
| 46 InstList &getInsts() { return Insts; } | 46 InstList &getInsts() { return Insts; } |
| 47 void appendInst(Inst *Inst); | 47 void appendInst(Inst *Inst); |
| 48 void renumberInstructions(); |
| 48 | 49 |
| 49 // Add a predecessor edge to the InEdges list for each of this | 50 // Add a predecessor edge to the InEdges list for each of this |
| 50 // node's successors. | 51 // node's successors. |
| 51 void computePredecessors(); | 52 void computePredecessors(); |
| 52 | 53 |
| 53 void placePhiLoads(); | 54 void placePhiLoads(); |
| 54 void placePhiStores(); | 55 void placePhiStores(); |
| 55 void deletePhis(); | 56 void deletePhis(); |
| 57 void doAddressOpt(); |
| 56 void genCode(); | 58 void genCode(); |
| 59 void livenessLightweight(); |
| 60 bool liveness(Liveness *Liveness); |
| 61 void livenessPostprocess(LivenessMode Mode, Liveness *Liveness); |
| 57 void emit(Cfg *Func) const; | 62 void emit(Cfg *Func) const; |
| 58 void dump(Cfg *Func) const; | 63 void dump(Cfg *Func) const; |
| 59 | 64 |
| 60 private: | 65 private: |
| 61 CfgNode(Cfg *Func, SizeT LabelIndex, IceString Name); | 66 CfgNode(Cfg *Func, SizeT LabelIndex, IceString Name); |
| 62 CfgNode(const CfgNode &) LLVM_DELETED_FUNCTION; | 67 CfgNode(const CfgNode &) LLVM_DELETED_FUNCTION; |
| 63 CfgNode &operator=(const CfgNode &) LLVM_DELETED_FUNCTION; | 68 CfgNode &operator=(const CfgNode &) LLVM_DELETED_FUNCTION; |
| 64 Cfg *const Func; | 69 Cfg *const Func; |
| 65 const SizeT Number; // label index | 70 const SizeT Number; // label index |
| 66 IceString Name; // for dumping only | 71 IceString Name; // for dumping only |
| 67 bool HasReturn; // does this block need an epilog? | 72 bool HasReturn; // does this block need an epilog? |
| 68 NodeList InEdges; // in no particular order | 73 NodeList InEdges; // in no particular order |
| 69 NodeList OutEdges; // in no particular order | 74 NodeList OutEdges; // in no particular order |
| 70 PhiList Phis; // unordered set of phi instructions | 75 PhiList Phis; // unordered set of phi instructions |
| 71 InstList Insts; // ordered list of non-phi instructions | 76 InstList Insts; // ordered list of non-phi instructions |
| 72 }; | 77 }; |
| 73 | 78 |
| 74 } // end of namespace Ice | 79 } // end of namespace Ice |
| 75 | 80 |
| 76 #endif // SUBZERO_SRC_ICECFGNODE_H | 81 #endif // SUBZERO_SRC_ICECFGNODE_H |
| OLD | NEW |