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

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: Created 6 years, 7 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
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 bool liveness(LivenessMode Mode, Liveness *Liveness);
60 void livenessPostprocess(LivenessMode Mode, Liveness *Liveness);
57 void emit(Cfg *Func) const; 61 void emit(Cfg *Func) const;
58 void dump(Cfg *Func) const; 62 void dump(Cfg *Func) const;
59 63
60 private: 64 private:
61 CfgNode(Cfg *Func, SizeT LabelIndex, IceString Name); 65 CfgNode(Cfg *Func, SizeT LabelIndex, IceString Name);
62 CfgNode(const CfgNode &) LLVM_DELETED_FUNCTION; 66 CfgNode(const CfgNode &) LLVM_DELETED_FUNCTION;
63 CfgNode &operator=(const CfgNode &) LLVM_DELETED_FUNCTION; 67 CfgNode &operator=(const CfgNode &) LLVM_DELETED_FUNCTION;
64 Cfg *const Func; 68 Cfg *const Func;
65 const SizeT Number; // label index 69 const SizeT Number; // label index
66 IceString Name; // for dumping only 70 IceString Name; // for dumping only
67 bool HasReturn; // does this block need an epilog? 71 bool HasReturn; // does this block need an epilog?
68 NodeList InEdges; // in no particular order 72 NodeList InEdges; // in no particular order
69 NodeList OutEdges; // in no particular order 73 NodeList OutEdges; // in no particular order
70 PhiList Phis; // unordered set of phi instructions 74 PhiList Phis; // unordered set of phi instructions
71 InstList Insts; // ordered list of non-phi instructions 75 InstList Insts; // ordered list of non-phi instructions
72 }; 76 };
73 77
74 } // end of namespace Ice 78 } // end of namespace Ice
75 79
76 #endif // SUBZERO_SRC_ICECFGNODE_H 80 #endif // SUBZERO_SRC_ICECFGNODE_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698