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

Side by Side Diff: src/IceCfg.h

Issue 1147023007: Subzero: Basic Block Profiler. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Adds Basic Block Profiling. Created 5 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
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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 VariablesMetadata *getVMetadata() const { return VMetadata.get(); } 125 VariablesMetadata *getVMetadata() const { return VMetadata.get(); }
126 Liveness *getLiveness() const { return Live.get(); } 126 Liveness *getLiveness() const { return Live.get(); }
127 template <typename T = Assembler> T *getAssembler() const { 127 template <typename T = Assembler> T *getAssembler() const {
128 return static_cast<T *>(TargetAssembler.get()); 128 return static_cast<T *>(TargetAssembler.get());
129 } 129 }
130 Assembler *releaseAssembler() { return TargetAssembler.release(); } 130 Assembler *releaseAssembler() { return TargetAssembler.release(); }
131 bool hasComputedFrame() const; 131 bool hasComputedFrame() const;
132 bool getFocusedTiming() const { return FocusedTiming; } 132 bool getFocusedTiming() const { return FocusedTiming; }
133 void setFocusedTiming() { FocusedTiming = true; } 133 void setFocusedTiming() { FocusedTiming = true; }
134 134
135 std::unique_ptr<VariableDeclarationList> profileBlocks();
136 static bool isProfileGlobal(const VariableDeclaration &Var);
137
135 // Passes over the CFG. 138 // Passes over the CFG.
136 void translate(); 139 void translate();
137 // After the CFG is fully constructed, iterate over the nodes and 140 // After the CFG is fully constructed, iterate over the nodes and
138 // compute the predecessor and successor edges, in the form of 141 // compute the predecessor and successor edges, in the form of
139 // CfgNode::InEdges[] and CfgNode::OutEdges[]. 142 // CfgNode::InEdges[] and CfgNode::OutEdges[].
140 void computeInOutEdges(); 143 void computeInOutEdges();
141 void renumberInstructions(); 144 void renumberInstructions();
142 void placePhiLoads(); 145 void placePhiLoads();
143 void placePhiStores(); 146 void placePhiStores();
144 void deletePhis(); 147 void deletePhis();
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 // other uses are possible. 225 // other uses are possible.
223 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); 226 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg);
224 227
225 public: 228 public:
226 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } 229 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); }
227 }; 230 };
228 231
229 } // end of namespace Ice 232 } // end of namespace Ice
230 233
231 #endif // SUBZERO_SRC_ICECFG_H 234 #endif // SUBZERO_SRC_ICECFG_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698