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

Side by Side Diff: src/IceCfgNode.h

Issue 1257283004: Iasm and obj lowering for advanced switch lowering. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Rebase Created 5 years, 4 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/IceClFlags.h » ('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 /// \file 10 /// \file
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 } 47 }
48 48
49 /// The HasReturn flag indicates that this node contains a return 49 /// The HasReturn flag indicates that this node contains a return
50 /// instruction and therefore needs an epilog. 50 /// instruction and therefore needs an epilog.
51 void setHasReturn() { HasReturn = true; } 51 void setHasReturn() { HasReturn = true; }
52 bool getHasReturn() const { return HasReturn; } 52 bool getHasReturn() const { return HasReturn; }
53 53
54 void setNeedsPlacement(bool Value) { NeedsPlacement = Value; } 54 void setNeedsPlacement(bool Value) { NeedsPlacement = Value; }
55 bool needsPlacement() const { return NeedsPlacement; } 55 bool needsPlacement() const { return NeedsPlacement; }
56 56
57 void setNeedsAlignment() { NeedsAlignment = true; }
58 bool needsAlignment() const { return NeedsAlignment; }
59
57 /// \name Access predecessor and successor edge lists. 60 /// \name Access predecessor and successor edge lists.
58 /// @{ 61 /// @{
59 const NodeList &getInEdges() const { return InEdges; } 62 const NodeList &getInEdges() const { return InEdges; }
60 const NodeList &getOutEdges() const { return OutEdges; } 63 const NodeList &getOutEdges() const { return OutEdges; }
61 /// @} 64 /// @}
62 65
63 /// \name Manage the instruction list. 66 /// \name Manage the instruction list.
64 /// @{ 67 /// @{
65 InstList &getInsts() { return Insts; } 68 InstList &getInsts() { return Insts; }
66 PhiList &getPhis() { return Phis; } 69 PhiList &getPhis() { return Phis; }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 void profileExecutionCount(VariableDeclaration *Var); 106 void profileExecutionCount(VariableDeclaration *Var);
104 107
105 private: 108 private:
106 CfgNode(Cfg *Func, SizeT LabelIndex); 109 CfgNode(Cfg *Func, SizeT LabelIndex);
107 Cfg *const Func; 110 Cfg *const Func;
108 SizeT Number; /// label index 111 SizeT Number; /// label index
109 Cfg::IdentifierIndexType NameIndex = 112 Cfg::IdentifierIndexType NameIndex =
110 Cfg::IdentifierIndexInvalid; /// index into Cfg::NodeNames table 113 Cfg::IdentifierIndexInvalid; /// index into Cfg::NodeNames table
111 bool HasReturn = false; /// does this block need an epilog? 114 bool HasReturn = false; /// does this block need an epilog?
112 bool NeedsPlacement = false; 115 bool NeedsPlacement = false;
116 bool NeedsAlignment = false; /// is sandboxing required?
113 InstNumberT InstCountEstimate = 0; /// rough instruction count estimate 117 InstNumberT InstCountEstimate = 0; /// rough instruction count estimate
114 NodeList InEdges; /// in no particular order 118 NodeList InEdges; /// in no particular order
115 NodeList OutEdges; /// in no particular order 119 NodeList OutEdges; /// in no particular order
116 PhiList Phis; /// unordered set of phi instructions 120 PhiList Phis; /// unordered set of phi instructions
117 InstList Insts; /// ordered list of non-phi instructions 121 InstList Insts; /// ordered list of non-phi instructions
118 }; 122 };
119 123
120 } // end of namespace Ice 124 } // end of namespace Ice
121 125
122 #endif // SUBZERO_SRC_ICECFGNODE_H 126 #endif // SUBZERO_SRC_ICECFGNODE_H
OLDNEW
« no previous file with comments | « src/IceCfg.cpp ('k') | src/IceClFlags.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698