OLD | NEW |
(Empty) | |
| 1 // -*- Mode: c++ -*- |
| 2 /* Copyright 2014 The Native Client Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can |
| 4 * be found in the LICENSE file. |
| 5 */ |
| 6 |
| 7 #ifndef _IceCfgNode_h |
| 8 #define _IceCfgNode_h |
| 9 |
| 10 #include "IceDefs.h" |
| 11 |
| 12 class IceCfgNode { |
| 13 public: |
| 14 static IceCfgNode *create(IceCfg *Cfg, uint32_t LabelIndex, |
| 15 IceString Name = "") { |
| 16 return new IceCfgNode(Cfg, LabelIndex, Name); |
| 17 } |
| 18 |
| 19 uint32_t getIndex(void) const { return Number; } |
| 20 IceString getName(void) const; |
| 21 |
| 22 const IceNodeList &getInEdges(void) const { return InEdges; } |
| 23 const IceNodeList &getOutEdges(void) const { return OutEdges; } |
| 24 |
| 25 IceInstList &getInsts(void) { return Insts; } |
| 26 void appendInst(IceInst *Inst); |
| 27 |
| 28 void registerEdges(void); |
| 29 |
| 30 void dump(IceOstream &Str) const; |
| 31 |
| 32 private: |
| 33 IceCfgNode(IceCfg *Cfg, uint32_t LabelIndex, IceString Name); |
| 34 IceCfg *const Cfg; |
| 35 const uint32_t Number; // label index |
| 36 IceString Name; // for dumping only |
| 37 IceNodeList InEdges; // in no particular order |
| 38 IceNodeList OutEdges; // in no particular order |
| 39 IcePhiList Phis; // unordered set of phi instructions |
| 40 IceInstList Insts; // ordered list of non-phi instructions |
| 41 }; |
| 42 |
| 43 #endif // _IceCfgNode_h |
OLD | NEW |