Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: IceCfgNode.h

Issue 205613002: Initial skeleton of Subzero. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« IceCfg.h ('K') | « IceCfg.cpp ('k') | IceCfgNode.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: IceCfgNode.h
diff --git a/IceCfgNode.h b/IceCfgNode.h
new file mode 100644
index 0000000000000000000000000000000000000000..a921313b6600512b14084180f2ef566af8d40664
--- /dev/null
+++ b/IceCfgNode.h
@@ -0,0 +1,43 @@
+// -*- Mode: c++ -*-
+/* Copyright 2014 The Native Client Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can
+ * be found in the LICENSE file.
+ */
+
+#ifndef _IceCfgNode_h
+#define _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(void) const { return Number; }
+ IceString getName(void) const;
+
+ const IceNodeList &getInEdges(void) const { return InEdges; }
+ const IceNodeList &getOutEdges(void) const { return OutEdges; }
+
+ IceInstList &getInsts(void) { return Insts; }
+ void appendInst(IceInst *Inst);
+
+ void registerEdges(void);
+
+ 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 // _IceCfgNode_h
« IceCfg.h ('K') | « IceCfg.cpp ('k') | IceCfgNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698