Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 //===- subzero/src/IceCfgNode.h - Control flow graph node -------*- C++ -*-===// | |
| 2 // | |
| 3 // The Subzero Code Generator | |
| 4 // | |
| 5 // This file is distributed under the University of Illinois Open Source | |
| 6 // License. See LICENSE.TXT for details. | |
| 7 // | |
| 8 //===----------------------------------------------------------------------===// | |
| 9 // | |
| 10 // This file declares the IceCfgNode class, which represents a single | |
| 11 // basic block as its instruction list, in-edge list, and out-edge | |
| 12 // list. | |
| 13 // | |
| 14 //===----------------------------------------------------------------------===// | |
| 15 | |
| 16 #ifndef SUBZERO_SRC_ICECFGNODE_H | |
| 17 #define SUBZERO_SRC_ICECFGNODE_H | |
| 18 | |
| 19 #include "IceDefs.h" | |
| 20 | |
| 21 class IceCfgNode { | |
| 22 public: | |
| 23 static IceCfgNode *create(IceCfg *Cfg, uint32_t LabelIndex, | |
| 24 IceString Name = "") { | |
| 25 return new (Cfg->allocate<IceCfgNode>()) IceCfgNode(Cfg, LabelIndex, Name); | |
| 26 } | |
| 27 | |
| 28 uint32_t getIndex() const { return Number; } | |
| 29 IceString getName() const; | |
| 30 | |
| 31 const IceNodeList &getInEdges() const { return InEdges; } | |
| 32 const IceNodeList &getOutEdges() const { return OutEdges; } | |
| 33 | |
| 34 IceInstList &getInsts() { return Insts; } | |
| 35 void appendInst(IceInst *Inst); | |
| 36 | |
| 37 void registerEdges(); | |
|
JF
2014/04/16 01:27:32
What does this do?
Jim Stichnoth
2014/04/21 20:26:40
Done.
| |
| 38 | |
| 39 void dump(IceCfg *Cfg) const; | |
| 40 | |
| 41 private: | |
| 42 IceCfgNode(IceCfg *Cfg, uint32_t LabelIndex, IceString Name); | |
| 43 IceCfgNode(const IceCfgNode &) LLVM_DELETED_FUNCTION; | |
| 44 IceCfgNode &operator=(const IceCfgNode &) LLVM_DELETED_FUNCTION; | |
| 45 IceCfg *const Cfg; | |
| 46 const uint32_t Number; // label index | |
| 47 IceString Name; // for dumping only | |
| 48 IceNodeList InEdges; // in no particular order | |
| 49 IceNodeList OutEdges; // in no particular order | |
| 50 IcePhiList Phis; // unordered set of phi instructions | |
| 51 IceInstList Insts; // ordered list of non-phi instructions | |
| 52 }; | |
| 53 | |
| 54 #endif // SUBZERO_SRC_ICECFGNODE_H | |
| OLD | NEW |