| Index: src/IceCfgNode.h
|
| diff --git a/src/IceCfgNode.h b/src/IceCfgNode.h
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..68efeb4dfaa176f6b7a373ad3cf1b7914d705fd8
|
| --- /dev/null
|
| +++ b/src/IceCfgNode.h
|
| @@ -0,0 +1,52 @@
|
| +//===- subzero/src/IceCfgNode.h - Control flow graph node -------*- C++ -*-===//
|
| +//
|
| +// The Subzero Code Generator
|
| +//
|
| +// This file is distributed under the University of Illinois Open Source
|
| +// License. See LICENSE.TXT for details.
|
| +//
|
| +//===----------------------------------------------------------------------===//
|
| +//
|
| +// This file declares the IceCfgNode class, which represents a single
|
| +// basic block as its instruction list, in-edge list, and out-edge
|
| +// list.
|
| +//
|
| +//===----------------------------------------------------------------------===//
|
| +
|
| +#ifndef SUBZERO_ICECFGNODE_H
|
| +#define SUBZERO_ICECFGNODE_H
|
| +
|
| +#include "IceDefs.h"
|
| +
|
| +class IceCfgNode {
|
| +public:
|
| + static IceCfgNode *create(IceCfg *Cfg, uint32_t LabelIndex,
|
| + IceString Name = "") {
|
| + return new IceCfgNode(Cfg, LabelIndex, Name);
|
| + }
|
| +
|
| + uint32_t getIndex() const { return Number; }
|
| + IceString getName() const;
|
| +
|
| + const IceNodeList &getInEdges() const { return InEdges; }
|
| + const IceNodeList &getOutEdges() const { return OutEdges; }
|
| +
|
| + IceInstList &getInsts() { return Insts; }
|
| + void appendInst(IceInst *Inst);
|
| +
|
| + void registerEdges();
|
| +
|
| + void dump(IceOstream &Str) const;
|
| +
|
| +private:
|
| + IceCfgNode(IceCfg *Cfg, uint32_t LabelIndex, IceString Name);
|
| + IceCfg *const Cfg;
|
| + const uint32_t Number; // label index
|
| + IceString Name; // for dumping only
|
| + IceNodeList InEdges; // in no particular order
|
| + IceNodeList OutEdges; // in no particular order
|
| + IcePhiList Phis; // unordered set of phi instructions
|
| + IceInstList Insts; // ordered list of non-phi instructions
|
| +};
|
| +
|
| +#endif // SUBZERO_ICECFGNODE_H
|
|
|