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

Side by Side Diff: src/IceCfgNode.h

Issue 300563003: Subzero: Initial O2 lowering (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Jan's third-round comments Created 6 years, 6 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 unified diff | Download patch
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceCfgNode.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceCfgNode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698