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

Side by Side Diff: src/IceTargetLoweringX8632.h

Issue 463563006: Subzero: Randomly insert nops. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Remove redundancy and fix formatting. Created 6 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/IceTargetLoweringX8632.h - x86-32 lowering ---*- C++ -*-===// 1 //===- subzero/src/IceTargetLoweringX8632.h - x86-32 lowering ---*- 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 TargetLoweringX8632 class, which 10 // This file declares the TargetLoweringX8632 class, which
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 virtual void lowerInsertElement(const InstInsertElement *Inst); 97 virtual void lowerInsertElement(const InstInsertElement *Inst);
98 virtual void lowerLoad(const InstLoad *Inst); 98 virtual void lowerLoad(const InstLoad *Inst);
99 virtual void lowerPhi(const InstPhi *Inst); 99 virtual void lowerPhi(const InstPhi *Inst);
100 virtual void lowerRet(const InstRet *Inst); 100 virtual void lowerRet(const InstRet *Inst);
101 virtual void lowerSelect(const InstSelect *Inst); 101 virtual void lowerSelect(const InstSelect *Inst);
102 virtual void lowerStore(const InstStore *Inst); 102 virtual void lowerStore(const InstStore *Inst);
103 virtual void lowerSwitch(const InstSwitch *Inst); 103 virtual void lowerSwitch(const InstSwitch *Inst);
104 virtual void lowerUnreachable(const InstUnreachable *Inst); 104 virtual void lowerUnreachable(const InstUnreachable *Inst);
105 virtual void doAddressOptLoad(); 105 virtual void doAddressOptLoad();
106 virtual void doAddressOptStore(); 106 virtual void doAddressOptStore();
107 virtual void randomlyInsertNop(float Probability);
107 108
108 // Naive lowering of cmpxchg. 109 // Naive lowering of cmpxchg.
109 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected, 110 void lowerAtomicCmpxchg(Variable *DestPrev, Operand *Ptr, Operand *Expected,
110 Operand *Desired); 111 Operand *Desired);
111 // Attempt a more optimized lowering of cmpxchg. Returns true if optimized. 112 // Attempt a more optimized lowering of cmpxchg. Returns true if optimized.
112 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr, 113 bool tryOptimizedCmpxchgCmpBr(Variable *DestPrev, Operand *Ptr,
113 Operand *Expected, Operand *Desired); 114 Operand *Expected, Operand *Desired);
114 void lowerAtomicRMW(Variable *Dest, uint32_t Operation, Operand *Ptr, 115 void lowerAtomicRMW(Variable *Dest, uint32_t Operation, Operand *Ptr,
115 Operand *Val); 116 Operand *Val);
116 void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal, 117 void lowerCountZeros(bool Cttz, Type Ty, Variable *Dest, Operand *FirstVal,
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 } 319 }
319 void _mulps(Variable *Dest, Operand *Src0) { 320 void _mulps(Variable *Dest, Operand *Src0) {
320 Context.insert(InstX8632Mulps::create(Func, Dest, Src0)); 321 Context.insert(InstX8632Mulps::create(Func, Dest, Src0));
321 } 322 }
322 void _mulss(Variable *Dest, Operand *Src0) { 323 void _mulss(Variable *Dest, Operand *Src0) {
323 Context.insert(InstX8632Mulss::create(Func, Dest, Src0)); 324 Context.insert(InstX8632Mulss::create(Func, Dest, Src0));
324 } 325 }
325 void _neg(Variable *SrcDest) { 326 void _neg(Variable *SrcDest) {
326 Context.insert(InstX8632Neg::create(Func, SrcDest)); 327 Context.insert(InstX8632Neg::create(Func, SrcDest));
327 } 328 }
329 void _nop(SizeT Length = 1) {
330 Context.insert(InstX8632Nop::create(Func, Length));
331 }
328 void _or(Variable *Dest, Operand *Src0) { 332 void _or(Variable *Dest, Operand *Src0) {
329 Context.insert(InstX8632Or::create(Func, Dest, Src0)); 333 Context.insert(InstX8632Or::create(Func, Dest, Src0));
330 } 334 }
331 void _padd(Variable *Dest, Operand *Src0) { 335 void _padd(Variable *Dest, Operand *Src0) {
332 Context.insert(InstX8632Padd::create(Func, Dest, Src0)); 336 Context.insert(InstX8632Padd::create(Func, Dest, Src0));
333 } 337 }
334 void _pand(Variable *Dest, Operand *Src0) { 338 void _pand(Variable *Dest, Operand *Src0) {
335 Context.insert(InstX8632Pand::create(Func, Dest, Src0)); 339 Context.insert(InstX8632Pand::create(Func, Dest, Src0));
336 } 340 }
337 void _pandn(Variable *Dest, Operand *Src0) { 341 void _pandn(Variable *Dest, Operand *Src0) {
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
493 virtual ~TargetGlobalInitX8632() {} 497 virtual ~TargetGlobalInitX8632() {}
494 }; 498 };
495 499
496 template <> void ConstantInteger::emit(GlobalContext *Ctx) const; 500 template <> void ConstantInteger::emit(GlobalContext *Ctx) const;
497 template <> void ConstantFloat::emit(GlobalContext *Ctx) const; 501 template <> void ConstantFloat::emit(GlobalContext *Ctx) const;
498 template <> void ConstantDouble::emit(GlobalContext *Ctx) const; 502 template <> void ConstantDouble::emit(GlobalContext *Ctx) const;
499 503
500 } // end of namespace Ice 504 } // end of namespace Ice
501 505
502 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H 506 #endif // SUBZERO_SRC_ICETARGETLOWERINGX8632_H
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698