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

Side by Side Diff: src/IceCfg.h

Issue 1300993002: Use separate random number generator for each randomization pass (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: rebase to master 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 | « 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 /// \file 10 /// \file
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 template <typename T = Assembler> T *getAssembler() const { 157 template <typename T = Assembler> T *getAssembler() const {
158 return llvm::dyn_cast<T>(TargetAssembler.get()); 158 return llvm::dyn_cast<T>(TargetAssembler.get());
159 } 159 }
160 Assembler *releaseAssembler() { return TargetAssembler.release(); } 160 Assembler *releaseAssembler() { return TargetAssembler.release(); }
161 std::unique_ptr<VariableDeclarationList> getGlobalInits() { 161 std::unique_ptr<VariableDeclarationList> getGlobalInits() {
162 return std::move(GlobalInits); 162 return std::move(GlobalInits);
163 } 163 }
164 bool hasComputedFrame() const; 164 bool hasComputedFrame() const;
165 bool getFocusedTiming() const { return FocusedTiming; } 165 bool getFocusedTiming() const { return FocusedTiming; }
166 void setFocusedTiming() { FocusedTiming = true; } 166 void setFocusedTiming() { FocusedTiming = true; }
167 uint32_t getConstantBlindingCookie() const { return ConstantBlindingCookie; }
167 /// @} 168 /// @}
168 169
169 /// Returns true if Var is a global variable that is used by the profiling 170 /// Returns true if Var is a global variable that is used by the profiling
170 /// code. 171 /// code.
171 static bool isProfileGlobal(const VariableDeclaration &Var); 172 static bool isProfileGlobal(const VariableDeclaration &Var);
172 173
173 /// Passes over the CFG. 174 /// Passes over the CFG.
174 void translate(); 175 void translate();
175 /// After the CFG is fully constructed, iterate over the nodes and 176 /// After the CFG is fully constructed, iterate over the nodes and
176 /// compute the predecessor and successor edges, in the form of 177 /// compute the predecessor and successor edges, in the form of
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
240 /// code needs to be defined. 241 /// code needs to be defined.
241 void profileBlocks(); 242 void profileBlocks();
242 243
243 /// Delete registered jump table placeholder instructions. This should only be 244 /// Delete registered jump table placeholder instructions. This should only be
244 /// called once all repointing has taken place. 245 /// called once all repointing has taken place.
245 void deleteJumpTableInsts(); 246 void deleteJumpTableInsts();
246 /// Iterate through the registered jump tables and emit them. 247 /// Iterate through the registered jump tables and emit them.
247 void emitJumpTables(); 248 void emitJumpTables();
248 249
249 GlobalContext *Ctx; 250 GlobalContext *Ctx;
250 uint32_t SequenceNumber; /// output order for emission 251 uint32_t SequenceNumber; /// output order for emission
252 uint32_t ConstantBlindingCookie = 0; /// cookie for constant blinding
251 VerboseMask VMask; 253 VerboseMask VMask;
252 IceString FunctionName = ""; 254 IceString FunctionName = "";
253 Type ReturnType = IceType_void; 255 Type ReturnType = IceType_void;
254 bool IsInternalLinkage = false; 256 bool IsInternalLinkage = false;
255 bool HasError = false; 257 bool HasError = false;
256 bool FocusedTiming = false; 258 bool FocusedTiming = false;
257 IceString ErrorMessage = ""; 259 IceString ErrorMessage = "";
258 CfgNode *Entry = nullptr; /// entry basic block 260 CfgNode *Entry = nullptr; /// entry basic block
259 NodeList Nodes; /// linearized node list; Entry should be first 261 NodeList Nodes; /// linearized node list; Entry should be first
260 std::vector<IceString> IdentifierNames; 262 std::vector<IceString> IdentifierNames;
(...skipping 22 matching lines...) Expand all
283 /// other uses are possible. 285 /// other uses are possible.
284 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg); 286 ICE_TLS_DECLARE_FIELD(const Cfg *, CurrentCfg);
285 287
286 public: 288 public:
287 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); } 289 static void TlsInit() { ICE_TLS_INIT_FIELD(CurrentCfg); }
288 }; 290 };
289 291
290 } // end of namespace Ice 292 } // end of namespace Ice
291 293
292 #endif // SUBZERO_SRC_ICECFG_H 294 #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