OLD | NEW |
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 Loading... |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |