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

Side by Side Diff: src/IceCfg.h

Issue 700263003: Rearrange emit vs emitIAS. Wait till function is done before dumping text. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: remove comment... might end up using the iterator Created 6 years, 1 month 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 | « no previous file | src/IceCfg.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/IceCfg.h - Control flow graph ----------------*- C++ -*-===// 1 //===- subzero/src/IceCfg.h - Control flow graph ----------------*- 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 Cfg class, which represents the control flow 10 // This file declares the Cfg class, which represents the control flow
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 void addImplicitArg(Variable *Arg); 87 void addImplicitArg(Variable *Arg);
88 const VarList &getImplicitArgs() const { return ImplicitArgs; } 88 const VarList &getImplicitArgs() const { return ImplicitArgs; }
89 89
90 // Miscellaneous accessors. 90 // Miscellaneous accessors.
91 TargetLowering *getTarget() const { return Target.get(); } 91 TargetLowering *getTarget() const { return Target.get(); }
92 VariablesMetadata *getVMetadata() const { return VMetadata.get(); } 92 VariablesMetadata *getVMetadata() const { return VMetadata.get(); }
93 Liveness *getLiveness() const { return Live.get(); } 93 Liveness *getLiveness() const { return Live.get(); }
94 template <typename T> T *getAssembler() const { 94 template <typename T> T *getAssembler() const {
95 return static_cast<T *>(TargetAssembler.get()); 95 return static_cast<T *>(TargetAssembler.get());
96 } 96 }
97 bool useIntegratedAssembler() const {
98 return getContext()->getFlags().UseIntegratedAssembler;
99 }
100 bool hasComputedFrame() const; 97 bool hasComputedFrame() const;
101 bool getFocusedTiming() const { return FocusedTiming; } 98 bool getFocusedTiming() const { return FocusedTiming; }
102 void setFocusedTiming() { FocusedTiming = true; } 99 void setFocusedTiming() { FocusedTiming = true; }
103 100
104 // Passes over the CFG. 101 // Passes over the CFG.
105 void translate(); 102 void translate();
106 // After the CFG is fully constructed, iterate over the nodes and 103 // After the CFG is fully constructed, iterate over the nodes and
107 // compute the predecessor edges, in the form of 104 // compute the predecessor edges, in the form of
108 // CfgNode::InEdges[]. 105 // CfgNode::InEdges[].
109 void computePredecessors(); 106 void computePredecessors();
(...skipping 14 matching lines...) Expand all
124 void contractEmptyNodes(); 121 void contractEmptyNodes();
125 void doBranchOpt(); 122 void doBranchOpt();
126 123
127 // Manage the CurrentNode field, which is used for validating the 124 // Manage the CurrentNode field, which is used for validating the
128 // Variable::DefNode field during dumping/emitting. 125 // Variable::DefNode field during dumping/emitting.
129 void setCurrentNode(const CfgNode *Node) { CurrentNode = Node; } 126 void setCurrentNode(const CfgNode *Node) { CurrentNode = Node; }
130 void resetCurrentNode() { setCurrentNode(NULL); } 127 void resetCurrentNode() { setCurrentNode(NULL); }
131 const CfgNode *getCurrentNode() const { return CurrentNode; } 128 const CfgNode *getCurrentNode() const { return CurrentNode; }
132 129
133 void emit(); 130 void emit();
131 void emitIAS();
132 void emitTextHeader(const IceString &MangledName);
134 void dump(const IceString &Message = ""); 133 void dump(const IceString &Message = "");
135 134
136 // Allocate data of type T using the per-Cfg allocator. 135 // Allocate data of type T using the per-Cfg allocator.
137 template <typename T> T *allocate() { return Allocator.Allocate<T>(); } 136 template <typename T> T *allocate() { return Allocator.Allocate<T>(); }
138 137
139 // Allocate an instruction of type T using the per-Cfg instruction allocator. 138 // Allocate an instruction of type T using the per-Cfg instruction allocator.
140 template <typename T> T *allocateInst() { return Allocator.Allocate<T>(); } 139 template <typename T> T *allocateInst() { return Allocator.Allocate<T>(); }
141 140
142 // Allocate an array of data of type T using the per-Cfg allocator. 141 // Allocate an array of data of type T using the per-Cfg allocator.
143 template <typename T> T *allocateArrayOf(size_t NumElems) { 142 template <typename T> T *allocateArrayOf(size_t NumElems) {
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // validating Variable::DefNode. Normally, a traversal over 188 // validating Variable::DefNode. Normally, a traversal over
190 // CfgNodes maintains this, but before global operations like 189 // CfgNodes maintains this, but before global operations like
191 // register allocation, resetCurrentNode() should be called to avoid 190 // register allocation, resetCurrentNode() should be called to avoid
192 // spurious validation failures. 191 // spurious validation failures.
193 const CfgNode *CurrentNode; 192 const CfgNode *CurrentNode;
194 }; 193 };
195 194
196 } // end of namespace Ice 195 } // end of namespace Ice
197 196
198 #endif // SUBZERO_SRC_ICECFG_H 197 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW
« no previous file with comments | « no previous file | src/IceCfg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698