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

Side by Side Diff: src/IceTargetLowering.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: Assign default value of ConstantBlindingCookie in its declaration 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
OLDNEW
1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- C++ -*-===// 1 //===- subzero/src/IceTargetLowering.h - Lowering interface -----*- 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 135 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 virtual void translateO1() { 146 virtual void translateO1() {
147 Func->setError("Target doesn't specify O1 lowering steps."); 147 Func->setError("Target doesn't specify O1 lowering steps.");
148 } 148 }
149 virtual void translateO2() { 149 virtual void translateO2() {
150 Func->setError("Target doesn't specify O2 lowering steps."); 150 Func->setError("Target doesn't specify O2 lowering steps.");
151 } 151 }
152 152
153 /// Tries to do address mode optimization on a single instruction. 153 /// Tries to do address mode optimization on a single instruction.
154 void doAddressOpt(); 154 void doAddressOpt();
155 /// Randomly insert NOPs. 155 /// Randomly insert NOPs.
156 void doNopInsertion(); 156 void doNopInsertion(RandomNumberGenerator &RNG);
157 /// Lowers a single non-Phi instruction. 157 /// Lowers a single non-Phi instruction.
158 void lower(); 158 void lower();
159 /// Inserts and lowers a single high-level instruction at a specific insertion 159 /// Inserts and lowers a single high-level instruction at a specific insertion
160 /// point. 160 /// point.
161 void lowerInst(CfgNode *Node, InstList::iterator Next, InstHighLevel *Instr); 161 void lowerInst(CfgNode *Node, InstList::iterator Next, InstHighLevel *Instr);
162 /// Does preliminary lowering of the set of Phi instructions in the 162 /// Does preliminary lowering of the set of Phi instructions in the
163 /// current node. The main intention is to do what's needed to keep 163 /// current node. The main intention is to do what's needed to keep
164 /// the unlowered Phi instructions consistent with the lowered 164 /// the unlowered Phi instructions consistent with the lowered
165 /// non-Phi instructions, e.g. to lower 64-bit operands on a 32-bit 165 /// non-Phi instructions, e.g. to lower 64-bit operands on a 32-bit
166 /// target. 166 /// target.
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
272 virtual void lowerPhi(const InstPhi *Inst) = 0; 272 virtual void lowerPhi(const InstPhi *Inst) = 0;
273 virtual void lowerRet(const InstRet *Inst) = 0; 273 virtual void lowerRet(const InstRet *Inst) = 0;
274 virtual void lowerSelect(const InstSelect *Inst) = 0; 274 virtual void lowerSelect(const InstSelect *Inst) = 0;
275 virtual void lowerStore(const InstStore *Inst) = 0; 275 virtual void lowerStore(const InstStore *Inst) = 0;
276 virtual void lowerSwitch(const InstSwitch *Inst) = 0; 276 virtual void lowerSwitch(const InstSwitch *Inst) = 0;
277 virtual void lowerUnreachable(const InstUnreachable *Inst) = 0; 277 virtual void lowerUnreachable(const InstUnreachable *Inst) = 0;
278 virtual void lowerOther(const Inst *Instr); 278 virtual void lowerOther(const Inst *Instr);
279 279
280 virtual void doAddressOptLoad() {} 280 virtual void doAddressOptLoad() {}
281 virtual void doAddressOptStore() {} 281 virtual void doAddressOptStore() {}
282 virtual void randomlyInsertNop(float Probability) = 0; 282 virtual void randomlyInsertNop(float Probability,
283 RandomNumberGenerator &RNG) = 0;
283 /// This gives the target an opportunity to post-process the lowered 284 /// This gives the target an opportunity to post-process the lowered
284 /// expansion before returning. 285 /// expansion before returning.
285 virtual void postLower() {} 286 virtual void postLower() {}
286 287
287 /// Find two-address non-SSA instructions and set the DestNonKillable flag 288 /// Find two-address non-SSA instructions and set the DestNonKillable flag
288 /// to keep liveness analysis consistent. 289 /// to keep liveness analysis consistent.
289 void inferTwoAddress(); 290 void inferTwoAddress();
290 291
291 /// Make a pass over the Cfg to determine which variables need stack slots 292 /// Make a pass over the Cfg to determine which variables need stack slots
292 /// and place them in a sorted list (SortedSpilledVariables). Among those, 293 /// and place them in a sorted list (SortedSpilledVariables). Among those,
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
450 virtual void lower() {} 451 virtual void lower() {}
451 452
452 protected: 453 protected:
453 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {} 454 explicit TargetHeaderLowering(GlobalContext *Ctx) : Ctx(Ctx) {}
454 GlobalContext *Ctx; 455 GlobalContext *Ctx;
455 }; 456 };
456 457
457 } // end of namespace Ice 458 } // end of namespace Ice
458 459
459 #endif // SUBZERO_SRC_ICETARGETLOWERING_H 460 #endif // SUBZERO_SRC_ICETARGETLOWERING_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698